HTMLButtonElement: willValidate property

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

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

{{APIRef("HTML DOM")}}

The **willValidate** read-only property of the {{domxref("HTMLButtonElement")}} interface indicates whether the {{htmlelement("button")}} element is a candidate for constraint validation. It is false if any conditions bar it from constraint validation, including:

  • Its {{domxref("HTMLButtonElement.type", "type")}} is reset or button;
  • It has a {{HTMLElement("datalist")}} ancestor;
  • The {{domxref("HTMLButtonElement.disabled", "disabled")}} property is true.

Value

A boolean value.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{domxref("HTMLButtonElement.checkValidity()")}}
  • {{HTMLElement("button")}}
  • {{HTMLElement("form")}}
  • Learn: Client-side form validation
  • Guide: Constraint validation