[whatwg] <input type=tel> validation, and a small set of typos

Ian Hickson ian at hixie.ch
Thu Jul 30 18:28:31 PDT 2009


On Mon, 20 Jul 2009, Peter Kasting wrote:
>
> Two unrelated comments.
> First, it seems a bit odd to me that <input type=email> and <input type=url>
> are validated (for typeMismatch problems) but <input type=tel> isn't.  I
> know it's prohibitively difficult to perfectly validate telephone number
> formats given the variety around the world, but it's also prohibitively
> difficult to validate email addresses per the relevant RFC, which is why
> HTML5 specs a much simpler algorithm that at least rejects obviously bad
> input.

This was originally considered, but in practice, telephone number fields 
are generally free-form fields that are interpreted by humans, unlike URI 
and e-mail values, which tend to be treated as opaque strings by humans 
and just handled purely by code.

(I carefully studied a number of telephone input UIs before making that 
particular design decision.)


> Second comment: There are 4 instances of a small typo in attribute lists,
> where "..., required, size, ..." is rendered as "..., required size, ...".

Fixed.


On Mon, 20 Jul 2009, Nils Dagsson Moskopp wrote:
> 
> What's with alphanumeric notation ? I think of 555-WHATWG as a possibly 
> valid telephone "number". It might be good to have an RFC on that. Or 
> maybe ITU has publicly available documents on numbering plans ?

The ITU does have some documents, but they weren't that useful (I studied 
them when writing the "tel" spec originally).


On Mon, 20 Jul 2009, Peter Kasting wrote:
> 
> Yeah, I thought of that kind of thing (but didn't mention it).  If we 
> don't want to disallow users from doing things like this, there probably 
> isn't a simple enough validation algorithm we can use.  It might be nice 
> to mention in the spec why type=tel is not validated the way email and 
> url are, at that point.

Done.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list