org.barracudamvc.core.forms.validators
Class ValidatorListValidator

java.lang.Object
  extended byorg.barracudamvc.core.forms.AbstractFormValidator
      extended byorg.barracudamvc.core.forms.DefaultFormValidator
          extended byorg.barracudamvc.core.forms.validators.ValidatorListValidator
All Implemented Interfaces:
FormValidator

public class ValidatorListValidator
extends DefaultFormValidator

Validate a list of zero or more Validators. This is much like the And validator except it makes it easier when validating an arbitrary number of validators. Also unlike the And validator, this will test validatation on all the included validators (i.e. it won't stop after the first failure).

Since:
csc_110304_1
Author:
christianc@atmreports.com

Field Summary
 
Fields inherited from class org.barracudamvc.core.forms.DefaultFormValidator
localLogger
 
Constructor Summary
ValidatorListValidator(Collection validators)
           
ValidatorListValidator(FormValidator[] validators)
           
 
Method Summary
 void validate(FormElement element, FormMap map, boolean deferExceptions)
          Validate a FormElement locally and allow any child validators a chance to validate as well.
 
Methods inherited from class org.barracudamvc.core.forms.DefaultFormValidator
addValidator, getValidators, removeValidator, validateForm, validateFormElement, validateFormElement
 
Methods inherited from class org.barracudamvc.core.forms.AbstractFormValidator
generateException, getErrorMessage, isNull, setErrorMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidatorListValidator

public ValidatorListValidator(Collection validators)

ValidatorListValidator

public ValidatorListValidator(FormValidator[] validators)
Method Detail

validate

public void validate(FormElement element,
                     FormMap map,
                     boolean deferExceptions)
              throws ValidationException
Description copied from class: DefaultFormValidator
Validate a FormElement locally and allow any child validators a chance to validate as well.

Specified by:
validate in interface FormValidator
Overrides:
validate in class DefaultFormValidator
Parameters:
element - the form element to be validated (null indicates we want to perform form level validation)
map - the map to which the element belongs (sometimes necessary to validate elements by comparing them with other elements)
deferExceptions - do we want to deferValidation exceptions and attempt to validate all elements so that we can process all the exceptions at once
Throws:
ValidationException - if the element is not valid


Copyright © 2004 BarracudaMVC.org All Rights Reserved.