[whatwg] Input type for phone numbers

Boris Zbarsky bzbarsky at MIT.EDU
Tue Mar 31 08:21:04 PDT 2009


Antti Koivisto wrote:
> I'd like to propose a new <input> type attribute value for phone 
> numbers  (<input type="phonenumber"> perhaps). The primary benefit would 
> be to enable use of phone number specific input methods (for example a 
> virtual keyboard) and pickers (for example a system address book). A 
> useful minimal implementation could limit the allowed characters to 
> those legal in phone numbers (+ * # and 0-9).

A brief look around shows the following characters also commonly used in 
phone numbers as people actually type them in the US: ' ' (ascii space), 
'.', '-', 'x' (this last in cases like "1-800-123-4567 x235").

This last case in particular is one I would suspect involves a good bit 
of regional variability; I doubt the Latin lowercase 'x' is used 
throughout the world to denote extensions.

-Boris



More information about the whatwg mailing list