type='tel' / HTML enhancement ?
If type='tel' is not part of html5, then who organizes the excact behavior of that attribute?
Hopefully, the tel attribute should accept two styles:
- National format phone number:
Here is an example from Finland:
0401234567
- International format phone number:
Here is the same example from Finland, but in proper international format:
+358401234567
So, in "tel" the rules should be as follows:
The first character may either be a digit or the special character "+".
Any other characters must be digits.
This format will serve for any country.
Here is another example from Australia:
+61418765432 (International format)
0418765432 (The same phone number in national format)
North americans seem to use their own format such as (212) 1234567.
But, the problem with this is, that it is incompatible with every other country.
Also it should be noted, that the length of a valid phone number may vary, both between countries and even within the same country. So, the "tel" should not force any length restriction, at least not any that is too strict.
I have no idea, what is the maximum legal phone number length in international format.
However, in Finland it is specified as 12 significant digits in the national part.
So, here is an example of the longest valid number that could be used in Finland:
0501234567890
or
+358501234567890 in international format.
In GSM mobile phones, if you use phone number as part of an AT -command, you may (in some commands) specify the type (format) of the number. But if you do not,
the default is to assume the number is in proper international format IF the number starts with the "+" character,
otherwise it is assumed to be in the national format,
meaning that a number which starts with a digit, will go to the same country the mobile phone is currently located in, unless the number starts with a known international prefix that is in effect in the country the mobile phone is currently located in.
So, is the "tel" safe to use in countries other than the USA, or does it force the number to the north american format, which is wrong for every country except for the USA ?