4 ms·
He should be validating the user's input before they are even allowed to submit the form (I use jQuery Form Validation). In addition to validation, he can mask
by mmuro 15y ago
He should be validating the user's input before they are even allowed to submit the form (I use jQuery Form Validation). In addition to validation, he can mask inputs require his fields are entered a certain way.
However, this sorta falls apart when you think about internationalization. Phone numbers are a good example. There are so many ways a phone number can be entered that it's almost always best to let the user type in the number in whatever format they want and then validate based on most US/Canada and International formats.
- daemin 15y agoI would think it would always be better to have more free-form input options for things such as names, addresses, phone numbers and such, and only force them into a certain form when you actually need it in that form. For sending packages and billing information.