title: React Formik : how to use custom function onChange and onConfirmChange for request input
body: <p>I would like to have my 2nd PinInput send an error message when the password is not the same :</p>
  
  <pre><code>class PasswordInput extends Component {
      state = "";
  
      onChange = () =&gt; {
          this.setState({
              value: this.state.value
          })
      }
  
      onConfirmChange = () =&gt; {
          this.setState({
              value: !this.state.value});
      }
  
  
      render() {
          const { field, form } = this.props;
  
          console.log(form.errors[field.name]);
          return (
              &lt;React.Fragment&gt;
  
                  &lt;label className="title-password"&gt;Saisi ton code à 4 chiffres&lt;/label&gt;
                  &lt;PinInput {...field} className="pincode-input-container"
                      length={4}
                      onChange={this.onChange}
                      type="numeric"
                      secret='true'
                      inputStyle={{
                          background: 'white',
                          height: '72px',
                          borderRadius: '20px',
                          borderColor: form.errors[field.name] ? 'red' : 'transparent'
                      }}
                  /&gt;
                  {form.errors[field.name] &amp;&amp;
                      &lt;div&gt;
                          {form.errors[field.name]}
                      &lt;/div&gt;}
  
                  &lt;label className="title-password"&gt;Confirme le code&lt;/label&gt;
                  &lt;PinInput {...field} length={4}
                      onChange={this.onConfirmChange}
                      type="numeric"
                      secret="true"
                      inputStyle={{
                          background: 'white',
                          border: 'none',
                          height: '72px',
                          borderRadius: '20px',
                          borderColor: form.errors[field.name] ? 'red' : 'transparent'
                      }}
                  /&gt;
                  {form.errors[field.name] &amp;&amp;
                      &lt;div&gt;
                          {form.errors[field.name]}
                      &lt;/div&gt;}
              &lt;/React.Fragment&gt;
          );
      }
  }
  
  export default PasswordInput;
  </code></pre>
  
  <p>I create 2 functions that call the type onChange (and onConfirmChange) 2 input, but I do not know how to do it.</p>
  
  <p>I have an idea beginning but I can not implement it.</p>
  
  <p>Thanks for your help !</p>