DOM Properties
ValidityState.valueMissing
True when a required control lacks a value according to its control-specific rules, such as an unchecked required checkbox. For a required text field, an empty string triggers the flag. A checkbox must be checked; a required radio group needs a selected member. Inspect willValidate separately before interpreting whether the form submission will actually be blocked. Example result: true.
Formal Syntax & Structure
html syntaxhtml
input.validity.valueMissingReturn Value
boolean
True if the missing-value constraint is violated; otherwise false.
Working Example
Example Snippethtml
<input required aria-label="Name"><p> Result: <output id="result"></output></p><script> const result = document.getElementById("result"); (async () => { const input = document.querySelector("input"); result.textContent = input.validity.valueMissing; })().catch(error => { result.textContent = "Error: " + error.name; });</script>