News for hackers. Stuff that matters.
Re:Falsehoods Programmers Believe About Phone Numbers by Marazan on Sunday March 20, 2016 @05:10AM (#11322325)
The point is not to include validation rules that will fail for well formed data.
Re:Falsehoods Programmers Believe About Phone Numbers by mikeash on Sunday March 20, 2016 @01:33PM (#11323772)
Going further, if at all possible, leave validation up to others. For example, don't validate delivery addresses at all if your shipping company has a validation API.

If you must do validation yourself, put in the time to research it and get it right, don't just bang something out based on your own experience of the problem domain.

Edit: one more: if you must validate, keep this separate from how you store the data, so you can more easily fix your mistakes or adapt to changes.