org.apache.tapestry.form.validator
Interface ValidatorFactory

All Known Implementing Classes:
ValidatorFactoryImpl

public interface ValidatorFactory

Constructs Validator instances from a specification. A specification is a comma-seperated list of entries. Each entry is in one of the following forms:

Most validator classes are configurable: they have a property that matches their name. For example, MinDate (which is named "minDate" has a minDate property. A few validators are not configurable ("required" => Required, for example).

Validators are expected to have a public no-args constructor. They are also expected to have a message property which is set from the value in brackets.

A full validator specification might be: required,email,minLength=20[Email addresses must be at least 20 characters long.]

Since:
4.0
Author:
Howard Lewis Ship

Method Summary
 java.util.List constructValidatorList(java.lang.String specification)
          Constructs a new (immutable) List of Validator, or returns a previously constructed List.
 

Method Detail

constructValidatorList

java.util.List constructValidatorList(java.lang.String specification)
Constructs a new (immutable) List of Validator, or returns a previously constructed List.

Parameters:
specification - a string identifying which validators and their configuration
Returns:
List of Validator (possibly empty)