org.apache.wicket.validation
Class CompoundValidator

java.lang.Object
  extended by org.apache.wicket.validation.CompoundValidator
All Implemented Interfaces:
java.io.Serializable, IClusterable, IValidator

public class CompoundValidator
extends java.lang.Object
implements IValidator

A compound IValidator. Once an error is reported against the IValidatable being checked, the rest of the validator chain is ignored.

Since:
1.2.6
Author:
Igor Vaynberg (ivaynberg)
See Also:
Serialized Form

Constructor Summary
CompoundValidator()
          Constructor.
 
Method Summary
 CompoundValidator add(IValidator validator)
          Adds an IValidator to the chain of validators.
 java.util.List getValidators()
          Gets an unmodifiable list of the registered validators.
 void validate(IValidatable validatable)
          Validates the IValidatable instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompoundValidator

public CompoundValidator()
Constructor.

Method Detail

add

public final CompoundValidator add(IValidator validator)
Adds an IValidator to the chain of validators.

Parameters:
validator - an IValidator to be added
Returns:
this ValidationError for chaining purposes

validate

public final void validate(IValidatable validatable)
Description copied from interface: IValidator
Validates the IValidatable instance. Validation errors should be reported using the IValidatable.error(IValidationError) method.

Specified by:
validate in interface IValidator
Parameters:
validatable - the IValidatable instance being validated
See Also:
IValidator.validate(IValidatable)

getValidators

public final java.util.List getValidators()
Gets an unmodifiable list of the registered validators.

Returns:


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.