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

Markus Ernst derernst at gmx.ch
Wed Apr 7 00:22:13 PDT 2010


Am 07.04.2010 01:28 schrieb Eduard Pascual:
> Maybe I'm being too hasty with this idea but, since machines don't
> really need the same readability aids as humans do, I'd suggest that
> the UA simply removes everything other than "+" and alphanumeric
> characters (and obviously adds nothing) when sending the field. 

I would actually expect sanitizing phone numbers to be done by the 
applications that use the numbers rather than by the application that 
collects them. If I collect a phone number and store it in a database, 
there might be several usages for them, e.g.:
1. Print out a list of numbers for manual dialling
2. Show a user record on screen, dial manually
3. Show a user record on screen, the phone number is linked for 
automatically invoking Skype or whatever application on click
4. Export phone numbers to an external application

For usages 1. and 2., the machine-readable sanitized number format might 
be a hassle, the unchanged user format will be preferred. Also, if a 
user loggs in to any application and is prompted to check her/his user 
data, the phone number will be expected to be shown in the same format 
as entered.

That's why I think phone numbers should be submitted unchanged in any 
case. Even for validation purposes, locale-based patterns are likely to 
be a problem, e.g. if you try to enter your US-phone number from an 
internet cafe in Bombay.



More information about the whatwg mailing list