Form validation

Form validation gives feedback about invalid user input when the user submits a form.


When to use

Use a form validation in the following cases:

  • When there are required input controls.
  • When there is user input that carries a risk for invalid input.
  • When a form contains dependencies between input controls.


The type of form validation depends on the choice of the input component. There are the following form validation types:

Standard validation

A validation can occur when for example:

  • The datatype isn’t correct.
  • The entered data has too many or not enough characters.
  • No data has been entered in a required field.

Text input as an example for standard validation

Form group as an example for standard validation

Selection group validation

A validation text can occur when for example:

  • Nothing has been selected.
  • Too much has been selected.
  • Not enough has been selected.

Checkbox group validation example

General construction

A form validation consists of the following elements:

1. Message, 2. Inline validation, 3. Indicator line, 4. User input, 5. Validation text

1. Message

  • An error message is displayed above the form and below the content header.
  • For more information on messages, see chapter Message.

2. Inline validation

  • An inline validation informs the user about errors relevant to a specific user input.
  • An inline validation consists of the elements 3. – 5. listed below.

3. Indicator line

  • The indicator line visually highlights an inline validation.

4. User input

  • The user input is in the validation state.

5. Validation text

  • A validation text contains an explanation how to resolve the error.
  • The validation text and the arrow icon are an anchor link to the corresponding input field.



After the user submits a form the page reloads and the viewport jumps to the top. If there is an error, a message appears above the form. This message states a general problem or summarizes multiple errors. The message is persistent until the form is resubmitted without rejection.

Error message above the form

The validation text and the arrow icon are clickable. They link to the corresponding field and on click the related input control is selected.

Validation text with mouseover

If controls have a description, the description text is not highlighted.

Checkbox group with descriptions


A fieldset containing an error, expands after validation of the form.

Expanded fieldset with validation

If the user collapses a fieldset with an error, an indicator line appears.

Collapsed fieldset with validation

Form group responsive behavior

A form group has one common description. All validation texts are listed below the description.

Form group on a large screen

When scaling down the viewport all form elements of a group take on the same width and order vertically below each other. The common description and all validation texts are listed below the last form element.

Form group on a small screen

Do’s & Don’ts


  • Use a validation text to tell the user what went wrong and why it went wrong.
  • Don’t make the user guess why the error occurred.


This chapter shows several form validation styles in the design system.



Text input


Combo box

Radio button group

Checkbox group


Checkbox group with additional information through description texts


1. Expanded fieldset, 2. Collapsed fieldset with indicator line

Responsive behavior

Example implementation of a form in desktop screen size

Example implementation of a form in mobile screen size


The following table gives reference to the different colors and shades:

Please refer to the specific component pages for specific style details on each element.

Name State Property Color name
Indicator line error Foreground color Functional red
Form border error Border color Validation red
Form input value error Foreground color Validation red
Validation text error Foreground color Validation red
Validation arrow icon error Foreground color Validation red


The following table gives reference to the different font sizes and weights:

Name State Font-family Font-size Line-height Text-align
Validation text error Siemens Sans Regular 13px 17px left

Sizing and spacing

The following measurements show the dimensions for this component:

Sizing for form validation

Spacing for form validation in a form group

Except where otherwise noted, content on this site is licensed under the MindSphere Development License Agreement.
Back to top