Invalid Phone Numbers

19 views
Skip to first unread message

Justin

unread,
Jan 13, 2026, 4:40:06 PM (2 days ago) Jan 13
to libphonenumber-discuss
Hello, 
I implemented libphonenumber into my application but it appears that it is not working for some newer area codes added in 2025 for the United States. The three I tested that weren't working were:
837 (California)
357 (California)
679 (Michigan)

Just populates that 357-XXX-XXXX is not a valid number. Sorry if this is not the right place to post, been looking everywhere for a solution to this. 

522_Sonu Sharma

unread,
Jan 13, 2026, 11:11:26 PM (2 days ago) Jan 13
to libphonenum...@googlegroups.com
Hi,

This is expected behavior and not an issue with your implementation.

libphonenumber validates phone numbers using a static metadata set that is bundled with the library at the time of release. Newly introduced NANPA area codes (such as 357, 837, and 679, which were activated in 2024–2025) will not be recognized by older versions of the library and may be reported as invalid.

If your libphonenumber version predates the addition of these overlays, numbers like 357-XXX-XXXX will fail isValidNumber() checks even though they are legitimate.


How to fix it

1. Update libphonenumber to the latest version

Upgrade to a version that includes the updated North American numbering metadata.

Examples:

Java / Android

implementation "com.googlecode.libphonenumber:libphonenumber:8.13.x"

JavaScript

npm install google-libphonenumber@latest

Python

pip install --upgrade phonenumbers


Rebuild and redeploy after upgrading.



2. (Optional) Use isPossibleNumber() instead of isValidNumber()

If this validation is for user input (e.g., registration forms), isPossibleNumber() may be more appropriate. It checks whether the number fits the correct NANP structure without requiring the area code to be fully recognized in the metadata.


---

The phone numbers are valid.

The failure is due to outdated libphonenumber metadata.

Updating the library resolves the issue.

Alternatively, relax validation if strict carrier/area-code validation is not required.



--
You received this message because you are subscribed to the Google Groups "libphonenumber-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libphonenumber-di...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/libphonenumber-discuss/43d5aa2d-3377-4887-81f5-c65b15f283edn%40googlegroups.com.

Kavitha Keshava (xWF)

unread,
Jan 13, 2026, 11:34:55 PM (2 days ago) Jan 13
to libphonenum...@googlegroups.com
Hi,

Thank you for using libphonenumber!

As per NANPA, the NPAs 837 (California), 357 (California) and 679 (Michigan) are allocated to their respective regions but have not yet been assigned to operators/carriers. 

Eg.679
image.png

Thanks & Regards,
Kavitha


Reply all
Reply to author
Forward
0 new messages