DOM Properties
ValidityState.rangeOverflow
True when a supported numeric or date value is above its applicable max. It may coexist with stepMismatch. For example, a number field with max=10 and value=12 has rangeOverflow set even if no other constraint is violated. The upper limit is inclusive. An empty field does not exceed max; check valueMissing separately when required. Example result: true.
Formal Syntax & Structure
html syntaxhtml
input.validity.rangeOverflowReturn Value
boolean
True when the parsed value exceeds the applicable upper bound.
Working Example
Example Snippethtml
<input type="number" max="10" value="12" aria-label="Quantity"><p> Result: <output id="result"></output></p><script> const result = document.getElementById("result"); (async () => { const input = document.querySelector("input"); result.textContent = input.validity.rangeOverflow; })().catch(error => { result.textContent = "Error: " + error.name; });</script>