title: How can I add required attribute to the fileds in react js?
body: <p>In the code I want to have a required attribute to make the field mandatory . But its not working.. Any simple way in react for this validation?</p>
  
  <pre><code>&lt;label htmlFor="name"&gt;Name&lt;/label&gt;
  &lt;input type="text" className="form-control"
  id="name" placeholder="Enter name" required/&gt;
  </code></pre>