HTMLFormElement: noValidate property
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
ThenoValidate property of theHTMLFormElement interface is a boolean value indicating if the<form> will bypassconstraint validation when submitted. It reflects the<form> element'snovalidate attribute; if the attribute present, the value istrue.
If this attribute is not set or the value is set tofalse, the form is validated. This can be overridden by setting theHTMLInputElement.formNoValidate orHTMLButtonElement.formNoValidate property totrue, either via JavaScript or the HTMLformnovalidate attribute, for the control used to submit the form.
This property can be retrieved or set.
In this article
Value
A boolean.
Examples
js
const element = document.getElementById("myForm");console.log(element.noValidate);Specifications
| Specification |
|---|
| HTML> # dom-fs-novalidate> |