Bean-Validation with MyFaces ExtVal
As usual it's quite easy to use BV with MyFaces ExtVal.
Use the Validation-Module for BV (myfaces-extval-bean-validation-x.x.3+ e.g.: myfaces-extval-bean-validation-1.2.3.jar) instead or in addition to the property-validation module of ExtVal. BV is a different story, however, you can use both validation modules in parallel. Also the component support modules (or the optional generic support module to enable e.g. RichFaces support) are completely compatible and can be used as usual.
Besides the core of ExtVal and the BV integration module, you just have to add BV itself (e.g. Hibernate Validator v4). After adding the required jar libs to the project you can start using BV constraints immediately without additional configuration.
So basically that's it!
Also os890/bv will provide some additional examples.
- Typesafe group validation via annotations (instead of the tag f:validateBean)
- Severity aware validation (+ nonblocking warn mode)
- Model validation
- Component initialization
- Trinidad based client-side validation
- Dependency injection
- Integration in JSF 1.x (and 2.x)
Mapped constraint source (ExtVal r4+)
More details are available here