A form has the possibilities to disable validation.
<form novalidate/>
Now, I have an HTML5 element not in a form. How to disable validation in that situation?
<noform>
<input name="email" type="email"/>
</noform>
A form has the possibilities to disable validation.
<form novalidate/>
Now, I have an HTML5 element not in a form. How to disable validation in that situation?
<noform>
<input name="email" type="email"/>
</noform>
It's not clear exactly what you want to achieve. If the input
element is not in a position to be submitted to the server then it will not trigger the validation process, as your comment seems to indicate you've discovered. However, the individual input
element can still be in an invalid state irrespective of that process. There are a couple of easy solutions to avoid this:
type="email"
email
but don't care about it being a valid email (eg. to trigger a particular keyboard mode on a mobile device) then use CSS to hide the indications.Here's how to hide the normal firefox red glow:
input:-moz-ui-invalid {
box-shadow: none;
}