Let the user enter information their way.
It can be very frustrating when you try to enter data into a website, and it returns an error, not because you entered the wrong number, but because you didn’t use the right combination of dashes, spaces, parentheses, or other non-numeric symbols. This syntactic sugar is not necessary and can be easily stripped out with a straightforward regular expression. Still, some developers feel it’s necessary to impose their will upon their users and make them add the symbols. This annoys the user and sometimes will cause them to abandon the form. After all, there are cat videos to see on YouTube. If you don’t value your customer’s time, they may soon get distracted and go elsewhere.
There are many ways to enter a date, for example. You might use slashes, or dashes, or spaces, or slashes and spaces, or periods, or some other thing. You might spell out the month completely, or use a three-letter abbreviation. You might use two digits or four digits for the year. It’s really not that hard to allow the user to enter a date their way. If you’re concerned that the value may be wrong, you can reformat the input after the focus leaves the field and display it back to the user.
Similarly, there are many ways to enter a phone number. Parentheses, dashes, dots, spaces, or some combination. Instead of forcing the user to enter it your way, let them enter it their way. You can reformat it afterward.
The same thing goes for social security numbers. Should the user have to enter the dashes? Or worse, did you divide this up into three separate fields, forcing multiple mouse actions to enter a number? Don’t make this hard.
If you make it easier to for your user to input data, they are more likely to finish filling out your form. Conversion rates are low for many reasons, and lousy user experience is high on the list. Be kind to your users.