Jump to content

Phone Number Allow For Whitespace


beechy34
 Share

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...