Wednesday, March 1, 2017

JSF - Validator Tags

JSF Validator Tags

JSF provides inbuilt validators to validate its UI components. These tags can validates length of field, type of input which can be a custom object.
For these tags you need 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"  
>
Following are important Validator Tags in JSF 2.0:
S.N.Tag & Description
1f:validateLength
Validates length of a string
2f:validateLongRange
Validates range of numeric value
3f:validateDoubleRange
Validates range of float value
4f:validateRegex
Validate JSF component with a given regular expression.
5Custom Validator
Creating a custom validator

No comments:

Post a Comment