The problem with using Regular expression is it is difficult to identify exactly what made the date invalid.
It either gives a True or a false-Without any reason which will help the user to fix.
It is unit tested with 100% code coverage and can be considered fit for production.
The project can be found on Git Hub where you can also find our issue tracker.
Function Date Validation Email Validation Phone Number Validation U.
Though for the datetime and date validator to you need to specify a parse and format function and for that you most likely will want to use a library, is highly recommended.It also intelligently checks that the date ranges are valid, so something like 02/30/2005 is caught.It is very important to validate the data supplied by the user through a form before you process it. In the following examples, a Java Script function is used to check a valid date format against a regular expression.We have also checked the leap year factor for the month of February.We have used "/" and "-" character as a separator within the date format but you are free to change that separator the way you want.