ttacon / libphonenumber

golang port of Google's libphonenumber
MIT License
616 stars 105 forks source link

Some valid phone numbers returning false when IsPossibleNumber is called #82

Open ruellia opened 5 years ago

ruellia commented 5 years ago

Example case:

parsedNumber, err := libphonenumber.Parse("+8201038791365", "")
formattedNumber := libphonenumber.Format(parsedNumber, libphonenumber.E164)
fmt.Printf("formatted number: %s \n", formattedNumber)
fmt.Printf("possible: %v \n", libphonenumber.IsPossibleNumber(number))
fmt.Printf("valid: %v \n", libphonenumber.IsValidNumber(number))

returns

formatted number: +821038791365
possible: false
valid: true

This number should be a possible number according to the Google lib source of truth.

I believe this issue was introduced by #79, as commits prior to hash 7104f0e work as expected.

This could potentially be a similar issue to #63, since isPossible is returning false but isValid is returning true.

sonic0002 commented 5 years ago

same issue occurring to us

harrycmfan commented 5 years ago

+1

Serjip commented 5 years ago

+1

sidchan1234 commented 5 years ago

+1

XanderDwyl commented 4 years ago

same here +1, got error in US number.