MyFaces Commons Validators contains some useful validators not provided by the spec, and a base class for create custom validators using myfaces-builder-plugin.
This base class ( org.apache.myfaces.commons.validator.ValidatorBase ) allow use ValueExpressions and in 2.0 version provides an implementation of StateHelper. This is useful in cases where parameters for the validator are bound to ValueExpression instance that are evaluated at runtime. By default, validator parameters are evaluated on build time (the first time the view is built), so they cannot change over the time (further web postback requests).
To understand this see the example on MyFaces Commons Converters section.
In summary, in this project you can found:
- <mcv:validateCSV> : Validation by validating comma separated values individually.
- <mcv:validateCompareTo> : Validates this component against another component. If the comparator attribute is specified, the component values are compared using the specified java.util.Comparator object.
- <mcv:validateCreditCard> : A custom validator for creditCards, based upon Jakarta Commons.
- <mcv:validateDateRestriction> : Validate that the date entered is within a given restriction.
- <mcv:validateEmail> : A custom validator for email address format, based upons Jakarta Commons.
- <mcv:validateISBN> : A custom validator for isbn codes, based upons Jakarta Commons.
- <mcv:validateRegExpr> : A custom validator for reg. expr., based upons Jakarta Commons.
- <mcv:validateUrl> : A custom validator for url format, based upons Jakarta Commons.