MyFaces Extensions Validator

The Validator project was recently added under the MyFaces Extensions umbrella project. This project was created as a separate project by its lead developer under a different name, but joined the MyFaces project in December 2008. Although the full name of the project is MyFaces Extensions Validator, it is mostly referred to as ExtVal.

The goal of ExtVal is to eliminate the need to repeat validation code in the View layer of a Java EE application. This is often necessary in order to give user-friendly error messages. However, according to the Don't Repeat Yourself (DRY) principle, repeating code is not desirable. ExtVal can use several types of annotations in the Model layer of your application to generate JSF validations:

Thus, ExtVal eliminates the need to add validators to JSF pages as well as the need to repeat validation code.

Getting started with ExtVal

ExtVal uses the "convention over configuration" principle throughout the project. That means getting started is as simple as downloading the needed libraries and adding them to the classpath of your project. ExtVal has a modular structure. Depending on your needs, you will need one or more different modules. The table below lists the available modules. The JAR files for these modules are provided within the ZIP file of the ExtVal distribution.

Module

JAR

Description

Core

myfaces-extval-core-x.y.z.jar

The core of ExtVal. This is the only module that is not optional.

Bean Validation

myfaces-extval-bean-validation-x.y.z.jar

Adds support for Bean Validation (JSR 303) annotations.

Property Validation

myfaces-extval-property-validation-x.y.z.jar

Adds support for ExtVal's own validation annotations.

Generic Support

myfaces-extval-generic-support-x.y.z.jar

Generic support module for JSF component libraries.

Trinidad Support

myfaces-extval-trinidad-support-x.y.z.jar 

Support for the Trinidad component set. E.g. uses Trinidad's client side validation capabilities.

Other support modules may be provided by third parties.

Drafts/Site/ExtVal (last edited 2011-03-18 14:12:33 by BartKummel)