I'm currently using a regex string to check, but it lets a lot of invalid dates through, like 2007-01-39, or 2019-02-30. I'm currently only allowing for dates of the format yyyy-mm-dd, though I'm not opposed to opening that up.
Here's my current regex string:
Code: Select all
/2[0-9]{3}-(0[1-9]|[11,12])-[0-3][0-9]/