OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to find the valid phone number length given a Country and PhoneType, using libphonenumber-js

  • Thread starter Thread starter Drew
  • Start date Start date
D

Drew

Guest
I'm using the libphonenumber-js library from CDN jsdelivr

https://cdn.jsdelivr.net/npm/libphonenumber-js/bundle/libphonenumber-js.min.js

Given I have a valid CountryCode (eg AU) and a PhoneType of mobile or fixed line, is there some way I can find the numeric length of a valid phone number for that type and country?

<p>I'm using the <code>libphonenumber-js</code> library from <strong>CDN <code>jsdelivr</code></strong></p>
<p><a href="https://cdn.jsdelivr.net/npm/libphonenumber-js/bundle/libphonenumber-js.min.js" rel="nofollow noreferrer">https://cdn.jsdelivr.net/npm/libphonenumber-js/bundle/libphonenumber-js.min.js</a></p>
<p>Given I have a valid <strong><code>CountryCode</code></strong> (eg <code>AU</code>) and a <strong><code>PhoneType</code></strong> of <code>mobile</code> or <code>fixed line</code>, is there some way I can find the numeric <strong><code>length</code></strong> of a valid phone number for that type and country?</p>
 

Latest posts

Top