title: react-select dropdown to be required
body: <p>I am new to react.</p>
  
  <p>I am trying to use below library to use dropdown.</p>
  
  <p>When I added 'required' attribute, it doesn't validate it with the form tag.</p>
  
  <p><a href="https://www.npmjs.com/package/react-select" rel="nofollow noreferrer">https://www.npmjs.com/package/react-select</a></p>
  
  <pre><code>import React from 'react';
  import Select from 'react-select';
  
  const options = [{
          value: 'chocolate',
          label: 'Chocolate'
      },
      {
          value: 'strawberry',
          label: 'Strawberry'
      },
      {
          value: 'vanilla',
          label: 'Vanilla'
      },
  ];
  
  class App extends React.Component {
      state = {
          selectedOption: null,
      };
      handleChange = selectedOption =&gt; {
          this.setState({
              selectedOption
          });
          console.log(`Option selected:`, selectedOption);
      };
      render() {
          const {
              selectedOption
          } = this.state;
  
          return ( &lt;
              Select value = {
                  selectedOption
              }
              onChange = {
                  this.handleChange
              }
              options = {
                  options
              }
              //required
              /&gt;
          );
      }
  }
  </code></pre>
  
  <p>When I looked at it from the console, it shows that input tag is wrapped with bunch of div. Is there a way to access the input from  Component? or is there a javascript code that I can access to input tag in order to add required directly?</p>
  
  <p><a href="https://i.stack.imgur.com/PsDY2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PsDY2.png" alt="enter image description here"></a></p>