nyaruka / phonenumbers

GoLang port of Google's libphonenumber library
MIT License
1.25k stars 148 forks source link

Some prefixes doesn't have country information and is number valid value is coming as false in the newer versions. #132

Closed kalyangcp123 closed 1 year ago

kalyangcp123 commented 1 year ago

We are using this library to get the country code and we are checking whether the number is valid or not.

In the older version v1.1.4, these prefixes are coming as valid and getting ISO2 value as well

When we upgraded to the newer version v1.1.5, the same prefixes are coming as invalid.

we would like to know why this is happening. Are these prefixes no longer supported in the newer versions?

Example Numbers:

number:+15572003073 isNumberValid: false ISO2:

number:+14722023008 isNumberValid: false ISO2:

Screenshot 2023-02-15 at 12 31 52 PM

Note: Even we have tried the latest version as well which is v1.1.6 Still no luck.

Awaiting your response.

Is there a way we can check which prefixes are valid or not?

kalyangcp123 commented 1 year ago

Any update on the above one? We are awaiting your response. This will be very crucial for us

rowanseymour commented 1 year ago

Are you seeing the same issue with https://github.com/google/libphonenumber ? This repo is just a port of that library to Go and we use their metadata. So it's important to know if this is a problem in the metadata, or something specific to this port.

kalyangcp123 commented 1 year ago

hi @rowanseymour ,

I have verified in this as well https://github.com/google/libphonenumber, we are seeing the same issue which the number is invalid.

Validation Results: Result from isPossibleNumber(): true Result from isValidNumber(): false Phone Number region: null Result from getNumberType(): UNKNOWN

If you could fix this issue it will be very helpful as well.

We are awaiting your response.

rowanseymour commented 1 year ago

If you're seeing the same issue there, then I'm afraid it needs to be fixed there, because we just pull down the metadata from that project.

siredwin commented 1 year ago

I am also facing the same problem. My international number comes as invalid even though I am using it now,