Validation:
Validation is a process of checking something against a standard.
What is a validator?
In programming validator is used to perform the validation process.
JSF validator tags:
JSF provides inbuilt validators to validate the UI component data. JSF validators can validates length, type, format etc.
For using JSF validator tags we have to use the following namespaces of URI in html node.
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" > |
Commonly used JSF validator tags:
Tag | Description |
f:validateLength | It validates length of a string |
f:validateLongRange | It validates range of numeric value |
f:validateDoubleRange | It validates range of float value |
f:validateRegex | It validates JSF component with a given regular expression. |
f:validateRequired | It validates that the input field is not empty. |
Custom Validator | It creates a custom validator |