Make phone number validity test work for Faroe islands and elsewhere.

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2015-11-09 17:38:46 -08:00
parent 2a103d2fe2
commit a8d6f5974f
3 changed files with 15 additions and 2 deletions
@@ -36,7 +36,10 @@ public class PhoneNumberFormatter {
private static final String TAG = PhoneNumberFormatter.class.getSimpleName();
public static boolean isValidNumber(String number) {
return number.matches("^\\+[0-9]{10,}");
return number.matches("^\\+[0-9]{10,}") ||
number.matches("^\\+298[0-9]{6}") ||
number.matches("^\\+240[0-9]{6}") ||
number.matches("^\\+689[0-9]{6}");
}
private static String impreciseFormatNumber(String number, String localNumber)