isValidPhoneNumber and parsePhoneNumber validate the number incorrectly #444
Open
Description
If you call isValidPhoneNumber("+485555555")
, it returns that it is a valid Polish number.
If you call parsePhoneNumber("+485555555")
, then the result:
PhoneNumber {
country: 'PL',
countryCallingCode: '48',
nationalNumber: '5555555',
number: '+485555555',
metadata: {
version: 4,
....
}
}
Actually this is not true because 5555555 is not a Polish phone number. Exactly the same problem with the combination +481111111
- Google demo: https://libphonenumber.appspot.com/phonenumberparser?number=5555555&country=PL
- libphonenumber-js demo: https://catamphetamine.gitlab.io/libphonenumber-js/?parseCountry=PL&parseValue=5555555&asYouTypeCountry=US&findNumbersCountry=US&findNumbersText=For%20more%20details%20call%20%2B7%20(800)%20555-35-35%20internationally%20or%20reach%20the%20local%20US%20branch%20at%20(213)%20373-4253%20ext.%201234%20for%20paid%20customer%20support.
Version
"libphonenumber-js": "^1.10.30",
Metadata
Assignees
Labels
No labels