Validators
Validators can be assigned to an element to check whether its value should be evaluated as valid or invalid. In the latter case, the corresponding element is considered 'not valid', which may also apply to parent-level elements. In input forms for business objects, ‘saving’ is prevented as long as it contains ‘not valid’ elements, just as it is also the case without the configuration of validators if all required fields are not filled.
Multiple validators can be configured for the same field, with each validator being assigned a specific check condition and an 'info text' that appears below the element if the check fails. If multiple validators are configured, the check is performed in the order selected by drag & drop within the configuration, and the first failure returns the info text for the display below the element (see examples below). However, the check for 'empty' always has the highest priority for required fields. Therefore, as long as a required field is empty, the standard text ('This field must be filled in.') always appears under the element.
To define the check condition, one of the following listed validator types must be selected and provided with specific parameters.
Irrespective of the validator type, the following settings are offered:
Info text: Message text (or an assignment from the language administration) for display under the element as soon as or as long as the inspection condition is not fulfilled.
Option 'Only if required field': A checkbox that determines whether the validator should only be evaluated depending on the ‘required field’ property of the element.
Option ‘Only if filled’: A checkbox that determines whether the validator should only be evaluated if the element contains a value.
Pass text: An optional text that is displayed if the validator has passed. If several validators are configured with a confirmation message, the last validator is displayed.
Option 'Visualize pass': If this option is activated, the element is highlighted in color if the validation is passed.
Tip: The texts are also evaluated as a calculation expression.
Validator types
Configuration
Via the properties category ‘Validation’ the validators can be configured for each element.
By clicking on the
symbol, validators can be added. Immediately after clicking, a selection list with all supported validator types appears.
The selected type is then displayed in the list as the label for the validator.
A validator can be removed via the trash can symbol. The configuration of the validator is opened with a double click or by clicking on the arrow symbol.
Which parameters are available to configure the validator depends on the validator type.
Example
The value of a text field is only considered valid if its value is an integer between 1 and 100.
Configuration |
Result |
|
|
Additionally a 'Pass text' and the visualization of the confirmation can be defined.
|
|