title: react-simple-validator Validation not working in functional component with hooks
body: <p>I am trying to use is in the functional component using React Hooks but its now showing up the validation message on UI</p>
  <p>My React version is below
  &quot;react&quot;: &quot;^16.8.6&quot;,
  &quot;react-dom&quot;: &quot;^16.8.6&quot;,</p>
  <p>Below is my code, Please check if I am missing anything.</p>
  <pre><code>import React from &quot;react&quot;;
  import SimpleReactValidator from &quot;simple-react-validator&quot;;
  
  export default function ExampleForm (){
    const [values, setValues] = React.useState({
      title: '',
      email:'',
    });
  
    const  handleChange = name =&gt; event =&gt; {
      setValues({ ...values, [name]: event.target.value });
    };
  
    const validator = new SimpleReactValidator({
      className: 'text-danger',
      messages: {
        email: 'That is not an email.',
      }
    });
  
    const submitForm= ()=&gt; {
      if (validator.allValid()) {
        alert('You submitted the form!');
      } else {
        validator.showMessages();
      }
    }
  
    return (
      &lt;div className=&quot;container&quot;&gt;
        &lt;div className=&quot;form-group&quot;&gt;
          &lt;label&gt;Title&lt;/label&gt;
          &lt;input className=&quot;form-control&quot; value={values.title}  onChange=handleChange(&quot;title&quot;)} /&gt;
   
  
          {validator.message('title', values.title, 'required|alpha')}
   
        &lt;/div&gt;
        &lt;div className=&quot;form-group&quot;&gt;
          &lt;label&gt;Email&lt;/label&gt;
          &lt;input className=&quot;form-control&quot; value={values.email} onChange=handleChange(&quot;email&quot;)} /&gt;
   
          {validator.message('email', values.email, 'required|email')}
   
        &lt;/div&gt;
  
        &lt;button className=&quot;btn btn-primary&quot; onClick={submitForm.bind(this)}&gt;Submit&lt;/button&gt;
      &lt;/div&gt;
    );
  }
  </code></pre>