I have a forf-formatting with millions of phone numbers i.e., the UI does not impose any barriers and Users are typing what they want
What I see is the Java API that can make best efforts to convert them into a consistent format. Ideally, the API will take free text value and country code and produce a valid international phone number or throw exceptions. For example, a phone number in the system may look like any of the following:
(555) 478-1123 555-478-1123 555.478.1123 5554781123
The API will "produce value", considering the US country "1 (555) 478-1123" The exact form for all of these does not matter, unless it is consistent.
Without the field code like "478-1123" the system also has numbers. In that case, I was hoping that noera kodai expiry, or something similar.
Yes, there may be data such as "ABC", which should also throw exceptions.
Of course, in the examples I have made countless changes, as well as the huge complexities of international phone numbers, which have very complicated verification rules
You can write your own (US Phone # for format):
- Any non-numeric character bar with a string
- Check that the remaining string is ten
- Sector Put the brackets around three characters and add a dash between the sixth and seventh characters.
- Prepaid "+1" for the string
Update:
Google Recently, international phone numbers have been parsed, formatted, stored and validated.
Comments
Post a Comment