Validating an email address in HTML5 by Brad Jones | JavaScriptSource

Validating an email address in HTML5 by Brad Jones

Brad Jones May 17, 2012

Abstract

Validating an email address in HTML5 is very simple.

Description

Validating an email address in HTML5 is very simple. The work is all done for you with a new control.

Code Snippet

<body>
<form action="http://www.example.org/subsribe.php">
<p>Enter an email address: </p>
<input type="email" name="email" />
<input type="submit" value="Submit" />
</form>

</body>

Leave a Response

(5 comments)

Mystic7, you definitely do not know html. By making input type ''email'' it automatically checks if it is an valid email adress. Please do research BEFORE you comment.

Brian Jul 12, 2014

thanks a lot

shariff Mabodya May 14, 2013

very good! I really wanted to know how it works

keiven Apr 10, 2013

Exactly how does making the input type "email" work? This is the dumbest "code" I've ever seen on this site.

mystic7 Aug 8, 2012

this is really very useful for me :) thanx

trishna singh Jul 22, 2012