Dofactory.com
Dofactory.com
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

HTML formnovalidate Attribute

The formnovalidate attribute on a submit button specifies that no form validation occurs during form submission.

This attribute can be applied to a <button> or <input> element of type submit.

Example

#

A formnovalidate attribute on the second submit <button> element.
The first button requires a valid email. The second button accepts anything.

<form action="/tutorial/action.html">
  <input type="email" name="email" placeholder="Enter your email" required>

  <button type="submit">Submit with validation</button>
  <button type="submit" formnovalidate>Submit with no validation</button>
</form>

For additional details see our HTML button formnovalidate Reference.


Using formnovalidate

The formnovalidate attribute specifies that no form validation takes place during form submission.

This attribute overrides any of the input element's validation requirements.


Syntax

<tagname type="submit" formnovalidate>

Elements that accept formnovalidate

The following elements accept the formnovalidate attribute.

Elements Description
<button> Must be a clickable button with type="submit" -- see example above
<input> Must be an input element with type="submit" or type="image".

<input> with formnovalidate

A formnovalidate attribute on a submit button.
This button will not validate the form input.


<form action="/tutorial/action.html">
  <input name="email" placeholder="Enter your email" required><br/>

  <input type="submit" value="Submit with validation"/>
  <input type="submit" value="Submit without validation" 
         formnovalidate/>
</form>

For additional details see our HTML input formnovalidate Reference.


Browser support

Here is when formnovalidate support started for each browser:

Chrome
6.0 Sep 2010
Firefox
4.0 Mar 2011
IE/Edge
11.0 Oct 2013
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like




Last updated on Sep 30, 2023

Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides