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.