I'm a fan of :required class! along its HTML counterpart, it helps you skip some javascript that you'd usually put in for form validation.
What are some other psuedo classes(and attributes) that can be used with forms to enhance the functionality without adding much javascript.
Derek Johnson
UX Developer
One of my favourites is
:invalid. You can tie it in with ARIA for a really nice UX on frontend validation.So for example
input:not([type=checkbox]):valid:not(:focus)+label::after { content: " ✓" }(It requires the input to come before the label which is fine for a11y and easy fixed visually with flexbox or positioning.