i am creating a project application for someone that i need that i need validating the registration number of a student… i wanted to follow the easiest was of doing it instead of using plugins…
i need to validate the following numbers:
-
IN17/24456/2012
-
in17/24456/12
-
1Np17/24456/2012
-
inP17/24456/12
AND HEY, these needs to be ultimately strict, as strict as possible…
here is HTML5 magic
<form>
<input pattern="(?:[A-Za-z]{2}[0-9]{2}|[A-Za-z]{2}[Pp]{1}[0-9]{2})\/[0-9]{5}\/([1-2]{1}[90]{1}[0-9]{2}|[901]{1}[0-9]{1})" required/>
<input type="submit" value="Reistration number"/>
</form>
and the application on apphabour
NB: i havent implemented this yet, but i will very soon…