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

I am an instigator of artistic, intelligent and mind boggling softwares. I love C#, envy C++, and one day I might try CUDA. I prefer solving complex and mission impossible problems in a new or old but innovative way. Am intrigued by machine learning challenges, security critical challenges, and privacy challenges like a real serverless peer-to-peer communication. I am usually literally stressed when a day goes by without learning or doing something new. I avoid repetition whenever possible. Away from computers, I enjoy capturing moments of life and nature with 1080 (…and above) pixel pictures and videos. I like details, accuracy, idealistic but realistic personalities. I love futurist’s but I hate fantasy. A decent, moderate and gentle character is my favorite. I avoid shame like a plague, confront my fears with facts, and I am very constant with opinions and beliefs. I love suits (…but don’t wear them), arsenal football club (…I only know the manager), and I have no favorite food. Reading and writing poems helps me retain my sobriety. I consider myself funny, privileged, a renaissance man and sometimes shy. I believe in things unseen and incomprehensible.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: