...
Validator | Constraint Type | Description | Example |
---|---|---|---|
– | Ensures that the given input looks like a valid e-mail address |
| |
max | long | Enforces a maximum integer value |
|
maxLength | int | Makes sure that a string value has a maximum length |
|
min | long | Enforces a minimum integer value |
|
minLength | int | Makes sure that a string value has a minimum length |
|
none | – | Does nothing (used to override a @Validate annotation) |
|
regexp | pattern | Makes sure that a string value conforms to a given pattern |
|
required | – | Makes sure that a string value is not null and not the empty string |
|
checked (Since 5.4.5) | boolean | Makes sure that the boolean is true (checkbox is checked) | <t:Checkbox value="value" validate="checked" /> |
unchecked (Since 5.4.5) | boolean | Makes sure that the boolean is false (checkbox is unchecked) | <t:Checkbox value="value" validate="unchecked" /> |
...
- The "required" validator adds the "required" attribute to the rendered HTML
The "checked" validator adds the "required" attribute to the rendered HTML (Since 5.4.5)
- The "regexp" validator adds the "pattern" attribute to the rendered HTML
- The "email" validator sets the
type
attribute to "email" in the rendered HTML - The "min" validator sets the
type
attribute to "number" and adds the "min" attribute in the rendered HTML - The "max" validator sets the
type
attribute to "number" and adds the "max" attribute in the rendered HTML - When bound to a number type, the TextField component sets the
type
attribute to "number" in the rendered HTML
...