catamphetamine / libphonenumber-js

A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript
https://catamphetamine.gitlab.io/libphonenumber-js/
MIT License
2.76k stars 218 forks source link

Invalid numbers #417

Closed LoickNosal closed 2 years ago

LoickNosal commented 2 years ago

Some numbers are invalid

Hi, I noticed that some phone numbers gave an isValidNumber() : false and a getNumberType() : UNKNOWN and I don't know why. This concerns all phone numbers beginning with 70, 71 and 72. I would like to know if this is a bug or if it is something normal ?

Example

For example the number +33 722345678 gave an isValidNumber() : false and a getNumberType() : UNKNOWN

Google's demo link

https://libphonenumber.appspot.com/phonenumberparser?number=722345678&country=FR We can see on this demo the isValidNumber() : false, getNumberType() : UNKNOWN and others invalid formatting results

Thank you for your help

catamphetamine commented 2 years ago

The Google's demo link you've provided says:

Result from isValidNumber() — false

This library is a port of the Google's library, so if Google says the number is not valid then you could submit and issue to Google. https://issuetracker.google.com/issues/new?component=192347&pli=1&template=829703