Jump to content

Phone Number Allow For Whitespace


beechy34

Recommended Posts

Your best bet is not to allow anything non-numerical. Tell your users that, and then make them correct the entry if they add ANY characters that are not numbers. There are too many ways a phone number can be written, too many extra characters they can add, and too many mistakes they can make, to try to allow them all.For the last 8-10 years, whenever I have registered with a serious corporation, the site only allows digits for phone numbers and credit card numbers. People are used to that. They won't complain, as long as you instruct them what to do.

Link to comment
Share on other sites

Easy, and in this case harmless enough, since you know the user's intent. I just have this security mindset that you should generally reject questionable data instead of altering it. This is probably a useful exception.

Link to comment
Share on other sites

It's also easy enough to just remove all non-number characters. I think that's probably a little more user-friendly than requiring a specific format, when the computer can just reformat it for you.
I was just suggesting that in another topic.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...