Performance is of the utmost importance on this one guys... This thing needs to be lightning fast! How would you validate the number of days in a given mont
Have you tried moment.js?
The validation is quite easy to use:
var m = moment("2015-11-32"); m.isValid(); // false
I don't know about the performances but hum the project is stared 11,000+ times on GitHub (kind of a quality guarantee).
Source: http://momentjs.com/docs/#/parsing/is-valid/