I have this regex to check date entry:
/^[0-9]{2}-[0-9]{2}-[0-9]{4}$|^$/
I also need it to make sure that the format MM-DD-YYYY is followed.
I've tried these and they don't work.
/^[01-12]-[01-31]-[0-9]{4}$|^$/
/^['01'-'12']-['01'-'31']-[0-9]{4}$|^$/
How can I make this also check to make sure the MM part is 01-12 and the DD part is only
01-31?