CSS3 :valid Selector
Select and style only if the value of the <input> element is valid:
Try it yourself »
Definition and Usage
The :valid selector selects form elements with a value that validates according to the element's settings.
Note: The :valid selector only works for form elements with limitations, such as input elements with min and max attributes, email fields with a legal email, or number fields with a numeric value, etc.
Tip: Use the :invalid selector to select form elements with a value that does not validate according to the element's settings.
The numbers in the table specifies the first browser version that fully supports the selector.
CSS Selector :invalid
Thank You For Helping Us!
Your message has been sent to W3Schools.