CSS Portal

HTML formnovalidate Attribute

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
formnovalidate
HTML AttributeThis attribute is supported by all modern browsers.
Updated 29th March 2024

Description

The formnovalidate attribute is a boolean attribute that can be used in HTML forms to bypass the form validation upon submission. This attribute is specifically applicable to <button> or <input> elements of type submit. When present, it indicates that the form data should be submitted without being subjected to the usual validation checks that would otherwise be applied based on the form's or individual input fields' validation constraints (like required, pattern, etc.).

This attribute is particularly useful in scenarios where the form has multiple submit buttons, and the developer wishes to enforce validation only for certain actions. For example, a form might have both a "Save Draft" and a "Submit" button. By applying formnovalidate to the "Save Draft" button, the form can be submitted without requiring all fields to be completed, which might be necessary for a formal submission.

The use of formnovalidate provides flexibility in handling form submissions, allowing developers to customize the user experience based on the context of the submission. It's important to note that while formnovalidate can control client-side validation, developers should always ensure that necessary validation checks are also performed on the server-side to maintain data integrity and security.

Syntax

<tagname type="submit" formnovalidate>

Values

The formnovalidate attribute is a boolean attribute, therefore no values are associated with this attribute.

Applies To

Example

<form novalidate action="formscript.php">
<label for="name">Name:</label><br>
<input type="text" id="name" name="name" required>
<br><br>
<label for="email">Email:</label><br>
<input type="email" id="email" name="email" required>
<br><br>
<input type="submit" value="Submit">
</form>
Open in editor

Browser Support

The following information will show you the current browser support for the HTML formnovalidate attribute. Hover over a browser icon to see the version that first introduced support for this HTML attribute.

This attribute is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee