I am doing a project that displays the semester wise marks according to the given HallTicket Number.
So, I have to provide validation for entered Hall ticket number using JavaScript.
And hall ticket number has following constraints:
--->It shouid hav exactly 10 characters
--->starting two positions may be 10 or 11 or 12
--->next four positions must be the string "kp1a"
--->later two positions may contains any of 02 or 04 or 05 or 12 only
--->remaing two positions may any digits from 01 to 60.
Can any one say how to write JavaScript for validating this kind of Hall ticket number?
a (slightly tested) non-regex solution