Closed alexmills closed 8 years ago
The worst part of a regex date validator, is that it cannot be completely correct anyway. What I mean by that is: a regex cannot take into account the edge cases such as February having 29 days in 2016 but not in 1900 but then again it does in 2000.
1900-02-29
is not a valid date but a regex will not tell you that. Heck, unless it's a really complicated regex I don't think it will even say that 2015-04-31
is not a valid date.
The cleanest code for dates is sometimes to simply parse and check if it's valid.
Thanks for submitting this / commenting on this. At this time we are closing this because we have completely re-written and are deprecating the previous feature set. If you feel this should be re-opened please feel free to review this blog post and submit either again on this repository, or on the new validatejs bridge repository
Thanks again!
The Regex for date validation (from here) is very long and ugly:
It would be awesome to have a specific date validator like this:
If you're interested, I could fork and build it for you guys to consider?