Form validation in pure css

The new css3 specification two css selectors :valid and :invalid. These are basically a pseudo-class which can work together with the form input element . Suppose you have an input element to check if a user types something correct or wrong. For checking, you only need to use html5 required attribute. Now with the :valid/:invalid selector you can edit the color of an input field so the user knows if it is correct or wrong.

Continue reading...