W3cubDocs

/Web APIs

ValidityState: valueMissing property

The read-only valueMissing property of a ValidityState object indicates if a required control, such as an <input>, <select>, or <textarea>, has an empty value.

If the required attribute is set, and no <option> is selected or a <textarea> or user-editable <input> is empty, the valueMissing property will be true. The property is only true if the field is required and has no value; if the field is not required, or if the field is required and has a value, the value is false.

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
valueMissing 4 12 4 10 12.1 5 ≤37 18 4 12.1 5 1.0

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/ValidityState/valueMissing