Validation

Error Styles

linkki calls setErrorMessage(String) and setInvalid(boolean) on all fields that support input validation when they are bound to properties for which a message with the matching ObjectProperty exists. linkki then sets different CSS style classes depending on the ErrorLevel of the message, derived from its Severity.

For example, a text field with a WARNING will have the attribute severity set to warning while a text field with an ERROR will have the attribute severity set to error.

When a message is set on the field, the field is color-coded. Additionally, the message appears below the field in the corresponding color. The fields and messages are styled using colors that are defined by the linkki theme. The color that is used depends on the severity of the message.