A Secure Online Service from Utah.gov

Utah.gov

STAT 2.0

A Service from Utah.gov

Field Patterns

Example Patterns and Validation with custom messages

The following fields will only be accepted if they meet the pattern when set to 'required' in modern browsers.

The 'User Name' field has a custom validation message added using the 'data-validity' attribute. Inspect element to view example.

pattern="[a-zA-Z]{1,50}" Enter Username (no spaces or special chars, 1-50 chars)

pattern="[a-zA-Z0-9\s]+" Enter Street Address (no special chars)

pattern="(\d{5}([\-]\d{4})?)" Enter Postal Code (no space, no special chars, accepts 88888 or 88888-8888)

Legacy Style Fieldsets

Example Legacy [narrow] layout

The following fields are a legacy type view but done using flexbox

Example

Example text going on here