3 ms·
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 validatio
by mikeash 11y ago
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.