Another way you can notify users of errors or required fields is through styling. New CSS selectors allow you to set styles for input elements based on whether they are valid or invalid, or they are required or optional.

In the example below, the borders are styled for invalid conditions. If required fields are empty, or validated fields have invalid data, their borders are styled red.

Registration
How did you learn about our site?


Form submitted.