4 ms·
Ideally, use a library that intelligently parses dates as part of a turing complete validator.
by crdoconnor 9y ago
Ideally, use a library that intelligently parses dates as part of a turing complete validator.
- avmich 9y agoThe point is that you can't always avoid scenarios with keeping something updated. List of countries is another example.
- crdoconnor 9y agoThe point isn't to avoid it. Of course it's inevitable - that was my point! The point is to use code to validate instead of some markup so that the programmer can use their judgment about how it should be delegated. I wrote some example code below that shows how you can validate with list of countries in such a way that no code changes will be required when the list changes.