Re:Falsehoods Programmers Believe About Phone Numbers
by Bluestrike2 on Sunday March 20, 2016 @02:46AM
(#11322063)
Oh, god. It's like a perfect storm for a crippling epistemological dilemma. "Nothing can be known, not even this" about sums it up. I guess we're stuck with working from probabilities. Carneades would be proud.
[ Parent
| on HN ]
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.