Friday, May 31, 2013

Check user's input without js using regular expressions and HTML5 !

HTML5 now allows you to check input attributes of the user using regular expressions without the use of any javascript using "pattern" attribute -

A simple example for email check -

<input type="email" pattern="[^ @]*@[^ @]*" value="">