Is it possible to require a "." after the "@"?
The required
validation only forces an email to have some content after the "@", but I would like to require a "." to make the user type in ".com/.org/etc"
http://jsfiddle.net/X6Uuc/333/
Is it possible to require a "." after the "@"?
The required
validation only forces an email to have some content after the "@", but I would like to require a "." to make the user type in ".com/.org/etc"
http://jsfiddle.net/X6Uuc/333/
If you're relying on the input[type=email]
you can also use the pattern
attr:
I got theRegEx in the example below from the W3C spec for the email input. The native pattern uses *
in the last part then it's not required, I only changed it to +
;
<form>
<input type="email" pattern="^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+$" required />
<button>Submit</button>
</form>