HTMLInputElement: willValidate property

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

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

{{APIRef("HTML DOM")}}

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

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

Value

A boolean value.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

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