:user-invalid (:-moz-ui-invalid)

The :user-invalid CSS pseudo-class represents any validated form element whose value isn't valid based on their validation constraints, after the user has interacted with it.

The :user-invalid pseudo-class must match an :invalid:out-of-range, or blank-but :required element between the time the user has attempted to submit the form and before the user has interacted again with the form element. 

The pseudo-class behaves in the same way as the non-standard :moz-ui-invalid pseudo-class.

By default, Gecko applies a style that creates a red "glow" (using the box-shadow property) around items, which have the :moz-ui-invalid pseudo-class applied. See the :invalid pseudo-class for an example that shows how to override the default style.

Syntax

:user-invalid

Specifications

Specification Status Comment
Selectors Level 4
The definition of ':user-invalid' in that specification.
Working Draft Adds :user-invalid

Browser compatibility

BCD tables only load in the browser

See also