Question : I am using Google's LibPhoneNumber package to validate phone numbers in Java. When the country is set to US, 7777777779 and 2234567890 are being classed as invalid numbers, but 7866438057 is valid. Why is this? I've tried reading why they may be invalid, such as on the US phone number wikipedia page, but I see no answer.
Code :
PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
try {
PhoneNumber parsedNumber = phoneUtil.parse(number, iso3Country);
//Is it a valid number for the locale?
if (!phoneUtil.isValidNumber(parsedNumber)) {
//TODO Throw error!
}
}