org.barracudamvc.core.forms.validators
Class ListValidator
java.lang.Object
org.barracudamvc.core.forms.AbstractFormValidator
org.barracudamvc.core.forms.validators.ListValidator
- All Implemented Interfaces:
- FormValidator
public class ListValidator
- extends AbstractFormValidator
This validator validates all items even if OrigVal is an instance of
java.util.List
- Author:
- Iman L Crawford (icrawford@greatnation.com)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
fv
protected FormValidator fv
ListValidator
public ListValidator(FormValidator ifv)
- Public constructor.
- Parameters:
ifv
- the validator we wish to make sure is not valid
ListValidator
public ListValidator(FormValidator ifv,
String ierrmsg)
- Public constructor.
- Parameters:
ifv
- the validator we wish to make sure is not validierrmsg
- the message associated with this error
getSubValidator
public FormValidator getSubValidator()
- Return the value that is being not'ed
- Returns:
- The form element to negate
validate
public void validate(FormElement element,
FormMap formMap,
boolean deferExceptions)
throws ValidationException
- Will check origVal's type and loop through all the values calling the
subValidator.
- Parameters:
element
- the form element to be validated (null indicates
we want to perform form level validation)formMap
- 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.