Hi,
I have a regex problem that I need some advice on. I am using a jquery plugin that validates input fields on a JSP. I am using the date validation. It all works fine but this field is not required and is not marked as required. When the user hits submit it shows a warning on the date input field since the empty string does not match the validation of a date. I need some way to say that nothing or a date is valid in a regex.
Here is the regex for the date; is there any way to put "or empty" into this also:
"date":{
"regex":"/^[0-9]{1,2}\-\[0-9]{1,2}\-\[0-9]{4}$/",
"alertText":"* Invalid date, must be in MM-DD-YYYY format"},
Thanks in advance