update jquery validation plugin dateISO javascript
- by Ian McCullough
Right now...the dateISO method is as follows:
dateISO: function(value, element) {
return this.optional(element) || /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(value);
},
but ive noticed that when a user enters something like 1991-99-99 it sees it as a "valid date" when it obviously is not. How would i change this code to have it check if the month is 01-12 and the date is 1-31?