[whatwg] Changing punctuation value of input element in telephone state

Mounir Lamouri mounir.lamouri at gmail.com
Tue Apr 6 16:13:49 PDT 2010


On 04/07/2010 01:08 AM, Ian Hickson wrote:
> On Wed, 7 Apr 2010, Mounir Lamouri wrote:
>>>
>>> Well the alternative is to not have the user agent change the value at 
>>> all, in which case you still have to do server-side canonicalisation, 
>>> so I don't think it really makes any difference.
>>
>> If the UA is not changing the value, we are sure at least webpage 
>> authors can easily specify how they want the telephone number to be 
>> formatted and check it with pattern attribute (or use 
>> setCustomValidity()).
> 
> If the author is doing the formatting, it's really not much better than a 
> type=text field. The reason to have type=tel is to allow the UA to do that 
> part of the work.

As Davis said, there are too many phone numbers format out there so we
can't let the UA do a formatting because it will be a bad one in most of
the cases. For example, in France, we use 2-digit blocks but in the US
people write 3-digit or 4-digit blocks.
Maybe the telephone type can be like the search one and be here only for
styling ?

--
Mounir



More information about the whatwg mailing list