title: How to validate the phone number using react
body: <p>Currently, I'm checking to validate the mobile number using <strong>'libphonenumber-js'</strong> plugin in react.</p>
  
  <p>It has a public method that is <strong>isValidNumber</strong> it has been used to validate the mobile number with extension code. </p>
  
  <p>My problem i,m this function has accepted 11 digits Indian mobile number(Actually Indian mobile number has only 10 digits number ). How to solve this?</p>
  
  <p>Actual Behavior</p>
  
  <pre><code>isValidNumber('+919876543210') =&gt; return true (10 digits)
  isValidNumber('+91987654321') =&gt; return false (9 digits)
  isValidNumber('+91987654321011') =&gt; return false  (12 digits)
  isValidNumber('+9198765432101') =&gt; return true (11 digits) // Accepted 11 digits :-(
  </code></pre>
  
  <p>Expected Behavior</p>
  
  <pre><code>isValidNumber('+919876543210') =&gt; return true (10 digits)
  isValidNumber('+91987654321') =&gt; return false (9 digits)
  isValidNumber('+91987654321011') =&gt; return false  (12 digits)
  isValidNumber('+9198765432101') =&gt; return false (11 digits) // It should be return false
  </code></pre>