When using HTML5 "email" fields — <input type="email"/>
— a lot of UAs (user agents/browsers) prevent you from submitting the form without using a "valid" (by regex) email address. They also apply the :invalid
pseudoclass. However this my conflict with your own validation scheme, and the lack of direct feedback may confusing visitors. Also, :invalid is applied (in Chrome 8) to my field before anyone even attempts to submit it. I hate this. I t makes it look like the user has made a mistake, but they haven’t yet.
So is it possible to use <input type="email"/>
without triggering validation behavior?
According to Philip Taylor (Philip
) on the irc.w3.org#html-wg IRC room:
http://whatwg.org/html5#attr-fs-novalidate says you can use to disable validation for the whole form
So basically, you can apply novalidate
as an attribute on the entire form. You can also specify a submit button to submit the form without validating — the canonical example is a “save progress” button that doesn’t validate at all. In that case, you put formnovalidate
on the submit button itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With