I am new to HTML5...
Here i am having some problem with email pattern attribute...
1)if i am giving the input like [email protected]... in email field..
2)it's not accepting value and showing "Pattern not matched"..
Help me to fix this....
Here is the snippet of Html
<form name='f1' method="POST" action="" >
<div id="fp">
<span style="margin-left:-50px">Email:</span>
<span><input class="input" type="email" name="Email" placeholder="Enter mailID" required pattern="^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$" ></span><br>
<input type="submit" name="submit" value="submit">
</div>
</form>
Any suggestions are acceptable....
this should be correct pattern
[^@]+@[^@]+\.[a-zA-Z]{2,6}
yes you forgot to consider lower case.
you can refer this document for more details