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

TypeUsage

 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

On fields, triggering the validation can occur before or after submitting the form:

If a user started editing a field which had a validation indication, the indication will be removed (i.e. it will be treated as if the user had edited the field for the 1st time).
<<TBD animation - show with at spinner field for ease of creating>>

If user had entered a form/page/screen for the first time (fields are empty), logical validation should not be enabled. However, syntax validation should be enabled.

in cases where user enters a page that already had input, the validation should be displayed (e.g. the user enters a page already edited with warnings in it)

Structure

The field validation consists of:


Examples:

Components


ErrorWarning

Text field

Text area

Combo button (free text field)

Spinner (free text field)

Date Picker (free text field)

Time Picker (free text field)


Search fieldNA

Toggle

NA

Slider

NA

Single checkbox

NA

Checkbox group

Grid table cell

Tab (question)<<TBD - Add in LUX>>

Call To Action with short text






(warning) on Error validation 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



*or any other controls that require user input and needs to be validated. 

Inputs with no validation:

  • inputs that have default selection only (e.g. radio buttons or some dropdown menus)
  • inputs that does not have text entry option, (when selection is done from a dropdown for example, we need to limit his selectable options to be only the valid ones)



Text


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.

<<#found an error message - add it here>>



Interaction - validation tooltips

Tooltips examples:

typeExamplesComments
1 row text


2 row text


Partial coverage of control

User can still click the control
Left position







Best Practices

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 linkScreen 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>>


Related items:


Current appearances in our products





Edge case

In case the form submit button is away from the form and so there is no way to place a message next to the submit button in order to indicate why it is disabled (EX: the save button is in the ribbon and the fields are in the right pane), you can use the pre-calculated field method:

  1. The user inputs invalid value and a tooltip + red frame appears immediately.
  2. If the user does not correct the value in the field, and he clicks on anything that changes the focus from that field, a pop up will appear that will state the error in the same way it was written in the short message above the form + the sentence:"Restored last valid value". in this case he will have 2 buttons ok and cancel (so the user won't lose all the data he inputed).
Guy Hivroni (Unlicensed): can you please add a design of the pop up and also a screen that contains a right pane form with a save button  

Edge case 2

In case multiple values were pasted into multiple fields and some of them are invalid:

  1. Tool tips will appear next to each one of the error fields.
  2. As soon as the user changes the focus, a pop up will appear that will state the error in the same way it was written in the short message above the form + the sentence:"Restored last valid value". and all values even legal ones will be restored to their previous value.