Back to Content

HTMLButtonElement: formNoValidate property

files/en-us/web/api/htmlbuttonelement/formnovalidate/index.md

latest1.5 KB
Original Source

{{APIRef("HTML DOM")}}

The formNoValidate property of the {{domxref("HTMLButtonElement")}} interface is a boolean value indicating if the {{htmlelement("form")}} will bypass constraint validation when submitted via the {{htmlelement("button")}}. It reflects the <button> element's formnovalidate attribute.

Its value overrides the {{domxref("HTMLFormElement.noValidate", "noValidate")}} property of the {{domxref("HTMLFormElement")}} interface if the form is submitted via the button. This property can be retrieved or set.

Value

A boolean.

Examples

js
const buttonElement = document.getElementById("myButton");
console.log(buttonElement.formNoValidate);

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{domxref("HTMLButtonElement.reportValidity()")}}
  • {{domxref("HTMLButtonElement.checkValidity()")}}
  • {{domxref("HTMLButtonElement.formAction")}}
  • {{domxref("HTMLButtonElement.formEnctype")}}
  • {{domxref("HTMLButtonElement.formMethod")}}
  • {{domxref("HTMLButtonElement.formTarget")}}
  • {{HTMLElement("form")}}
  • {{domxref("HTMLFormElement.noValidate")}}
  • {{domxref("HTMLInputElement.formNoValidate")}}
  • Learn: Client-side form validation
  • Guide: Constraint validation