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.79k stars 216 forks source link

Wrong UA (Ukraine) number validation #312

Closed egnashko closed 5 years ago

egnashko commented 5 years ago

Hi! Find an issue with UA (Ukraine) phone numbers. The correct format for mobile phone numbers is +380 XXX XX XX.

For example number is +3800671234567 validating pass (true). But it is incorrect, number must be +380671234567. Investigate that it works only with 0 before number and all other numbers validate correctly. correct (validating correct)

+380671234567
Possible: true
Valid: true

correct (validating incorrect)

+3800671234567
Possible: true
Valid: true

incorrect (validating correct)

+3801671234567
Possible: true
Valid: true
catamphetamine commented 5 years ago

See the Bug Reporting section of the readme.