New to Kendo UI for Angular? Start a free 30-day trial

Hints and Errors

The FormField enables you to display hint and error messages.

To render hints and errors, add the HintComponent or ErrorComponent instances inside the FormField component.

Default Setup

By default, the errors are hidden and will be displayed when the form control is invalid after user interaction. If provided, the hints will be initially visible and will hide if an error occurs.

Example
View Source
Edit In Stackblitz  
Change Theme:

Visibility

You can control the behavior of hint and error messages by setting the showHints and showErrors properties.

The available showHints values are:

  • (Default) initialThe hint messages are displayed when the state of the form-bound component is valid or untouched, and pristine.
  • alwaysThe hint messages are always displayed, leaving the control of their content visibility to the developer.

The available showErrors values are:

  • (Default) initialThe error messages are displayed when the state of the form-bound component is invalid and touched, or dirty.
  • alwaysThe error messages are always displayed, leaving the control of their content visibility to the developer.
Example
View Source
Edit In Stackblitz  
Change Theme:

Alignment

Both the HintComponent and ErrorComponent allow you to specify the text alignment by setting the align property.

Example
View Source
Edit In Stackblitz  
Change Theme:

In this article

Not finding the help you need?