What is the minimum length of a valid international phone number?

I need to check the input of the international phone number. According to E.164, the maximum length is 15 digits, but I could not find any information about the minimum. I count only numbers, no pluses or separators.

+85
validation
Feb 15 '13 at 12:38
source share
3 answers

As in different sources, I think that the minimum length in the E-164 format depends on the country. For example,

  • For Israel : The minimum phone number (excluding the country code) is 8 digits. - Official source (Country Code 972)
  • For Sweden : the minimum length (excluding the country code) is 7 digits. - Official source (country code 46)

  • For the Solomon Islands its 5 for fixed line phones. - Source (country code 677)

... and so on. So, including the country code, the minimum length is 9 digits for Sweden and 11 for Israel and 8 for the Solomon Islands.

Change (clean solution) . In fact, instead of checking the international phone number using various checks, such as length, etc., you can use Google libphonenumber . It can directly check the phone number in E164 format. It will take into account everything, and you do not even need to indicate the country if the number is in the valid E164 format. It is very good! Example:

String phoneNumberE164Format = "+14167129018" PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance(); try { PhoneNumber phoneNumberProto = phoneUtil.parse(phoneNumberE164Format, null); boolean isValid = phoneUtil.isValidNumber(phoneNumberProto); // returns true if valid if (isValid) { // Actions to perform if the number is valid } else { // Do necessary actions if its not valid } } catch (NumberParseException e) { System.err.println("NumberParseException was thrown: " + e.toString()); } 

If you know the country for which you are checking numbers, you do not even need the E164 format and you can specify the country in the .parse function instead of passing null .

+79
Jul 23 '13 at 15:17
source share

EDIT 2015-06-27: the minimum is 8, including the country code. My bad.

Original post

The minimum phone number I use is 10 digits. International users should always indicate their country code, and as far as I know, there are no countries with less than ten digits if you count the country code.

More information here: https://en.wikipedia.org/wiki/Telephone_numbering_plan

+5
Jul 18 '13 at 21:40
source share

The minimum length is 4 for Saint Helena (format: +290 XXXX) and Niue (format: +683 XXXX).

+1
May 16 '17 at 6:03 a.m.
source share



All Articles