There are several ways to validate the content of a component. In general input components have the option for validation. In the following sections, the different kinds von validation are explained.
Tag Library Documentation: <tc:sheet/> | <tc:column/>
A simple way of validation is the required attribute in some input components. The text area must not empty if the submit button is pressed. Otherwise a error message is displayed.
required
The length of a value can be validated by the <f:validateLength/> tag. Length means the number of characters. In this example, the given string must have at least two characters and maximal four characters.
<f:validateLength/>
Please note, an empty string will not be validated.
The range of a number can be validated via <f:validateLongRange/> or - for floating point numbers - <f:validateDoubleRange/>. In the following input field numbers from 3 to 77 can be added.
<f:validateLongRange/>
<f:validateDoubleRange/>
A value can be validated against a regex patter via the <f:validateRegex/> tag.
<f:validateRegex/>
The value in the field must be a word character combined with a number. For example 'T3'.
It's also possible to add custom validators using the validator attribute of an input component. In this case, only the string 'Tobago' (uppercase/lowercase ignored) is accepted.
validator
A validator check the password against the confirmation field. To get access to the confirmation field from the validator a binding with the binding attribute and the <f:attribute/> tag is created.
binding
<f:attribute/>