UI-Component Sets
Project Documentation


Tag name: <f:validator>
Tag class: javax.faces.webapp.ValidatorTag
Creates a validator and associates it with the nearest parent UIComponent. During the validation phase (or the apply-request-values phase for immediate components), if the associated component has any submitted value and the conversion of that value to the required type has succeeded then the specified validator type is invoked to test the validity of the converted value.

Commonly associated with an h:inputText entity, but may be applied to any input component.

Some validators may allow the component to use attributes to define component-specific validation constraints; see the f:attribute tag. See also the "validator" attribute of all input components, which allows a component to specify an arbitrary validation method (rather than a registered validation type, as this tag does).

Unless otherwise specified, all attributes accept static values or EL expressions. see Javadoc of JSF Specification


Name Type Required Description
validatorId String true The registered ID of the desired Validator.