I get a string value by a text box in html. I want to validate that string using if condition to see if the given string is a date.
if (matches ^\d\d\d\d((01|03|05|07|08|10|12)(30|31|[012]\d)|(04|06|09|11)(30|[012]\d)|02[012]\d)$)
if (endsWith "0229")
return true or false depending on the year being a leap year
return true
return false
I fond this code by googling but contain errors and not successful.
Please help me with this matter.