Flutterby™! : Next person I see implementing phone

Next unread comment / Catchup all unread comments User Account Info | Logout | XML/Pilot/etc versions | Long version (with comments) | Weblog archives | Site Map | | Browse Topics

Next person I see implementing phone

2012-03-09 19:06:10.100139+00 by Dan Lyke 4 comments

Next person I see implementing phone number input as 3 separate fields (so you can't paste into it), gets a serious smacking.

comments in descending chronological order (reverse):

#Comment Re: made: 2012-03-09 22:24:59.72709+00 by: DaveP

I try to use the +1 country-code whenever I have to enter my number. Some of the failure modes are interesting.

#Comment Re: made: 2012-03-09 20:42:00.50696+00 by: meuon

I have an outstanding issue in a project about phone number formatting like that. They want it (3 fields). Then I showed them all of the exceptions in their own system for long distance phone numbers. I'm working on a neat javascript function that shows it broken up to make them happy, but clicking the little icon next to it, displays a raw field. I'll post when it handles when it is bulletproof. +011 555 1234 5678 90123 is a valid phone number format for some places.

#Comment Re: made: 2012-03-09 19:40:12.805193+00 by: Dan Lyke

The more I deal with data that has specific meaning and formatting that changes over the years (addresses, phone numbers, host names, IP addresses, for example) I think the real problem is that we're attempting to do data validation at the wrong point. The place to do data validation is when the data is actually used, not when it's entered.

If that fails, then we need feedback loops to correct it, and that's the hard part because the gap between entry and failure can be very large, and the system can be complex if you don't have good auditing procedures to figure out where information was flowing from, but... if the user wants to enter a long string with alpha characters and spaces as the phone number, more power to 'em.

#Comment Re: made: 2012-03-09 19:25:38.17821+00 by: ebradway

Even worse are the ones that enforce some kind of punctuation rule, like:

(202)555-1212 202-555-1212



But then use Javascript to automatically advance you to the next field so you can't easily delete the characters.

Honestly, I blame the W3C for never providing basic field primitives in HTML forms...