type=page
status=published
title=Validating Composite Component Values
next=jsf-advanced-cc004.html
prev=jsf-advanced-cc002.html
~~~~~~
= Validating Composite Component Values


[[GKHWO]]

[[validating-composite-component-values]]
Validating Composite Component Values
-------------------------------------

JavaServer Faces provides the following tags for validating values of
input components. These tags can be used with the
`composite:valueHolder` or the `composite:editableValueHolder` tag.

link:#GKHVG[Table 14-2] lists commonly used validator tags. See
link:jsf-page-core003.html#BNATC[Using the Standard Validators] for
details and a complete list.

[[sthref75]][[GKHVG]]

*Table 14-2 Validator Tags*

[width="70%",cols="15%,55%"]
|=======================================================================
|*Tag Name* |*Description*
|`f:validateBean` |Delegates the validation of the local value to the
Bean Validation API.

|`f:validateRegex` |Uses the `pattern` attribute to validate the
wrapping component. The entire pattern is matched against the `String`
value of the component. If it matches, it is valid.

|`f:validateRequired` |Enforces the presence of a value. Has the same
effect as setting the `required` element of a composite component's
attribute to `true`.
|=======================================================================
