3 ms·
The point is not to include validation rules that will fail for well formed data.
by Marazan 11y ago
The point is not to include validation rules that will fail for well formed data.
- mikeash 11y agoGoing 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.