org.barracudamvc.core.forms.validators
Class ValidatorListValidator
java.lang.Object
org.barracudamvc.core.forms.AbstractFormValidator
org.barracudamvc.core.forms.DefaultFormValidator
org.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
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ValidatorListValidator
public ValidatorListValidator(Collection validators)
ValidatorListValidator
public ValidatorListValidator(FormValidator[] validators)
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 © 2006 BarracudaMVC.org All Rights Reserved.