I would like to validate my textbox which accepts Academic Year as input in the format YYYY-YY. How do I write a regular expression validation/ jquery client validation function for this?
function parseDate() {
alert("yeah");
var sAcadYearName = document
.getElementById('<%= txtAcademicYearName.ClientID%>');
var m = sAcadYearName.match(/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/);
return (m) ? new Date(m[3], m[2] - 1, m[1]) : null;
}