We're using cookies, but you can turn them off in Privacy Settings. If you use the site without changing settings, you are agreeing to our use of cookies. Learn more in our Privacy Policy.

Validation

(More Coming Soon!)

Form Validation

  • Last four characters of passport number is required. Edit
  • Passport expiration date is required. Edit

Indicates a required field

Validation
This field is required
Passport Expiration Date
Day
Month
Year
This field is required

HTML

Code coming soon!
            

Problem Being Solved

Users need to know how to correct form errors.

When to Use

  • Validation should be used on all fields that require a value. Validation should also be used for fields that require data to be entered in a specific format (e.g., email address) when the input is not dictated by the control type.
  • Note that the pattern consists of both field-level messaging and an error box at the top of the page with jumplinks to the field. This approach supports screenreaders.

When Not to Use

Validation is not necessary if a field is optional and doesn’t require a specific data format.

Formatting

We use the jquery Validation plugin for front end validation, with some customizations for certain fields. See https://jqueryvalidation.org/