I have date fields in my application, we got date pickers out but user is also allowed to enter the date in YYYY/MM/DD format. Now, we have handled the validations related to date format and invalid dates using the below regex:
"date": /^(?!0{4})\d{4}(\/)(0[1-9]|1[012])(\/)(0[1-9]|1[0-9]|2[0-9]|3[01])$/i,
Now, we are getting validations issue like
June is having 30 days but user is entering 31 and it is not getting validated Feb is having 28 days but user is entering 29 or above and it is not getting validated
One more scenario can come for feb month on leap year which needs to be validated
Can i use this scenarios to be handled by regex update or jquery code snippets??
Thanks in advance!!!