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

Advertisements

About Kabue Charles

As a software architect, I am specialized in .NET and JavaScript. As an entrepreneur, I invest my time, money, energy and will in creating things that will make lives better. As a philosopher, I learn about happiness, people and my environment. As a poet, I write about human transcendence. As a man, I am modest moralist, a centrist, a progressive evolutionist and a man of quotable quotes

Posted on February 25, 2015, in Learning, Technology and tagged , . Bookmark the permalink. Leave a comment.

Say Something....

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: