org.barracudamvc.core.forms.validators
Class EqualsValidator
java.lang.Object
org.barracudamvc.core.forms.AbstractFormValidator
org.barracudamvc.core.forms.DefaultFormValidator
org.barracudamvc.core.forms.validators.EqualsValidator
- All Implemented Interfaces:
- FormValidator
- public class EqualsValidator
- extends DefaultFormValidator
This validator ensures that the original value constitues a
valid type
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
obj
protected Object obj
EqualsValidator
public EqualsValidator()
- Public no-args constructor.
EqualsValidator
public EqualsValidator(Object iobj)
- Public constructor.
- Parameters:
iobj
- the object with which we wish to compare equality
EqualsValidator
public EqualsValidator(Object iobj,
String ierrmsg)
- Public constructor.
- Parameters:
iobj
- the object with which we wish to compare equalityierrmsg
- the message associated with this error
getObject
public Object getObject()
- Return the value that this object must equal.
validateFormElement
public void validateFormElement(Object val,
FormElement element,
boolean deferExceptions)
throws ValidationException
- Validate a FormElement to make see if the element equals() a
given object
- Overrides:
validateFormElement
in class DefaultFormValidator
- Parameters:
val
- the value to compare the element value toelement
- the form element that contains the val
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.