HTML formnovalidate Attribute
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.
Example
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
Tablets & Mobile
Last updated by CSSPortal on: 29th March 2024
