Back to Content

HTMLInputElement: willValidate property

files/en-us/web/api/htmlinputelement/willvalidate/index.md

latest976 B
Original Source

{{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