title: react material - ui text field validation : set custom error messages
body: <p>I have a material-UI textfield, after I key in some value, I want to set a error message if custom validations fail. </p>
  
  <p>I am able to set in error message when blank value is entered only. So instead of the blank value error messages, I want to add in my own customer error messages.</p>
  
  <pre><code>const checkValue = (newValue) =&gt; {
      var other = { 'a': 1 };
      if(!_.isEqual(newValue, other)) {
          alert('value is correct.');
          //I want to set error message next to field value is not correct.
      }
  }
  
  &lt;TextField
      id="form-value"
      className={classes.textField}
      margin="dense"
      label={'value'}
      value={value}
      onKeyUp={e =&gt; { checkValue(e.target.value); }}
      onChange={e =&gt; { checkValue(e.target.value); }}
      variant="outlined"
      error={value=== ""}
      helperText={value=== "" ? 'Please enter a value!' : ' '}
      fullWidth
  &gt;
  </code></pre>