Validating my Campus registration Number using HTML5 validation

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:

  1. IN17/24456/2012

  2. in17/24456/12

  3. 1Np17/24456/2012

  4. 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>

here is the a demo

and the application on apphabour

and the github repo

NB: i havent implemented this yet, but i will very soon…

please vote for my above Appharbour Application