title: react-phone-number-input validation failure
body: <p>I am trying to avoid submitting react form if any input errors occurs. But only for the phone number input field's validations which is handled by <code>react-phone-number-input</code> package I am having issues because it allows to submit even for invalid inputs. So I added <code>validate</code> property in rules object prop. But it throws me <code>parsePhoneNumber.js:18 Uncaught (in promise) TypeError: A text for parsing must be a string.</code> My attempt is as below.</p>
  <pre><code> &lt;Controller
      name=&quot;phoneNum&quot;
      render={({ field }) =&gt; (
        &lt;SPhone
           label={Properties.TEL}
           {...field}
           error={errors.phoneNum &amp;&amp; true}
           helperText={errors.phoneNum &amp;&amp; errors.phoneNum.msg}/&gt;
        )}
      control={control}
      defaultValue=&quot;&quot;
      rules={{validate: (value) =&gt; isValidPhoneNumber(value)}}
   /&gt;
  </code></pre>
  <p>So what is the correct way to assign the rules prop to satisfy with the above phone number validation?</p>