Computer Science, asked by RajgiriYadav4688, 11 months ago

Date format validation in javascript using regular expression

Answers

Answered by amit6464
0
Now you can use this function to check for valid dates; however, if you need to actually validate without rolling (e.g. "31/2/2010" doesn't automatically roll to "3/3/2010") then you've got another problem.

[Edit] If you also want to validate without rolling then you could add a check to compare against the original string to make sure it is the same date:

function parseDate(str) {
Similar questions