Guidelines for validating phone numbers
Phone numbers have a maximum length of 15 set by the International Telecommunication Union
The shortest phone number appears to be 8, including the country code, for numbers coming from the Solomon Islands.
Since users may leave out the country code, that makes the largest reasonable minimum as 5 characters.
Phone number extensions are largely unregulated, with the US using a maximum of 4 digits. It's common for the user to label the extension as
EXT: 4725, which introduces the requirement for letters in the input as well as additional length
There are a variety of formatting symbols used internationally, most prominently
- as well as whitespace.
Google has a service called libphonenumber which can validate specific numbers to ensure they comply to their specific regional code.
- Minimum length of 5 characters (Optional)
- Maximum length of at least 40 (Optional)
- No character set restriction
- +1 (780) 445 2524 EXT: 2245
- +44 113 496 0000