Web APIs

HTMLInputElement.willValidate

Try the free JavaScript compiler

Report whether the control participates in constraint validation. Disabled controls are barred from it. Example console output: true false.

Formal Syntax & Structure

javascript syntaxjavascript
input.willValidate

Return Value

boolean

Whether the control is a candidate for validation.

Working Example

Example Snippetjavascript
const i=document.createElement("input"); console.log(i.willValidate); i.disabled=true; console.log(i.willValidate);
JavaScript Reference