title: React validation using Material UI's TextField components
body: <p>I have been researching this for an hour now, and doesnt seem like there is  much examples on this on the internet. I am trying to validate the input fields so that  all fields are filled, otherwise there will be an error. Amount of characters doesnt matter, just need to fill the inputs.</p>
  <p>So here is my state object</p>
  <pre><code>constructor(props) {
      super(props);
      this.state = {
        firstName: '',
        lastName: '',
        ...,
      
      };
    }
  </code></pre>
  <p>And here are the material ui textfields</p>
  <pre><code>&lt;TextField
                  className={classes.formInput}
                  name=&quot;firstName&quot;
                  onChange={e =&gt; this.handleChange(e.target.value)}
                  required
                  id=&quot;&quot;
                  type=&quot;text&quot;
                  InputLabelProps={{
                    shrink: true,
                  }}
                  error={!firstName}
                  helperText=&quot;Name is required&quot;
                  label=&quot;First Name&quot;
                  variant=&quot;standard&quot; /&gt;
                &lt;TextField
                  className={classes.formInput}
                  name=&quot;lastName&quot;
                  onChange={e =&gt; this.handleChange(e.target.value)}
                  required
                  id=&quot;&quot;
                  type=&quot;text&quot;
                  InputLabelProps={{
                    shrink: true,
                  }}
                  label=&quot;Last Name&quot;
                  variant=&quot;standard&quot; /&gt;
  </code></pre>
  <p>And here is the onchange handler</p>
  <pre><code>   handleChange = (e) =&gt; {
       this.setState({
         [e.target.name]: e.target.value
       });
     }
  </code></pre>