Description

Field Validations are a way of talking to our users. It is designed to make the user understand a mistake and the ways to correct it.  

Example:

Types

Type

Usage

 Field validation error 

Alerting the user on actions that will not allow him to complete the task.

 Field validation warning

Alerting the user on actions that might contain a mistake or a non fatal error.

Usage & Behaviour

Internal Logic

All input fields will display the value entered by the user. If the input is invalid, an indication for invalid/warning will be displayed. Prevention of input is not allowed (e.g. typing on the keyboard “A” and not displaying it in the field)

Triggering the validation is set by 3 types:

Autocorrect - Some cases require an automatic correction of the invalid input.

Default input/validation

Structure

The field validation consists of:

Examples:

Components


Error

Warning

Text field

Text area

Dropdown menu

Combo box (free text field)

Spinner (free text field)

Date Picker (free text field)

Time Picker (free text field)

Search field

NA

Switch

NA

Slider

NA

Single checkbox

NA

Checkbox group

Grid table cell

Tab 

Call To Action with short text



(warning) on Error, button is disabled

Call To Action with mixed errors

(warning) error takes priority


Call to action with long text.

(warning) Pop-up size might need to expand in height


 *  Unlike "field validation error" the warning version can appear on top of controls that does not have a text field, since a warning can appear when there is a conflict between 2 controls. 

Text position:

Content

Rephrasing examples (taken from Verint's Suite):

Before

After

Percentage must be an integer

Please enter only numbers (e.g 48)

Max number of bids allowed (8) for this auction exceeded

You have reached (11) the maximum bids allowed (8) for this auction. Please remove 3 bids.

Not a valid number, please enter length in minutes

Please enter length in minutes (e.g. 30)

Invalid selection for employees - single or group

You can select a single employee as well as a single group or organization (not both)

The form has errors

Please complete all mandatory fields

Interaction

Validation tooltips

Tooltips positioning examples:

Content

Examples

Comments

1 or more rows of text right to the icon of validaton


Partial coverage of control

User can still click the control

Left position


Best Practices

Use field validations for any user input fields

Content Guidelines

Accessibility compliance

Focus management

Used as any component with a tooltip

Screen reader support 

Screen reader should read a loud the state of the field once the user focuses on it. 

Contrast & size compliance

Should be A11y complied

Design

Zeplin link

Screen thumbnail

https://app.zeplin.io/project/5970b366bee38cf87b2de932/screen/5baca0fa7044c49e813fe220

https://app.zeplin.io/project/5970b366bee38cf87b2de932/screen/5baca11066034667cc35f576

Code

<<a box containing the code - discuss with Femi>>