HTMLButtonElement: formNoValidate property

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{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](/en-US/docs/Web/HTML/Reference/Elements/button#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