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.77k stars 218 forks source link

Issue with Belarus telephone number validation #373

Closed Pieter-1337 closed 4 years ago

Pieter-1337 commented 4 years ago

when entering a number for Belarus (which has a national prefix of '8') that also starts with an '8' after the country code (+375) it's first occurence of 8 gets cut of.

for example when entering +37582004910060 (img below)

Belarus1

Which is valid on your online validator (img below)

Belarus3

the parseMax() function removes the first 8 which makes the number invalid... (img below)

Belarus2

catamphetamine commented 4 years ago

Published libphonenumber-js@1.7.39