CSS validation classes

Prerequisites

⚠️ This exercise requires that you have completed the HTML Banking Form exercise.

Setup

These commands are a helpful quick start. You may choose to ignore them completely and create your own directory structure. If you choose to use this recommendation, just copy the commands below. It doesn't matter what directory you are currently in.

mkdir -p ~/workspace/exercises/the-static-web/validate-application && cd $_
touch index.html
touch validation.css

Requirements

There are CSS selectors that you can use to check for the validity of the new HTML5 input types of email, tel, phone, etc. Your task is to enhance your Google Fu and find out what they are.

  1. Paste the banking form HTML into your document.
  2. When a valid web URL or email address is entered into the corresponding field, the color of the field should be green.
  3. If the value is invalid, the color should be red.