|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.barracudamvc.core.forms.AbstractFormValidator
org.barracudamvc.core.forms.DefaultFormValidator
org.barracudamvc.core.forms.validators.RangeValidator
This validator ensures that a value is within a given number range
Field Summary | |
protected Number |
n1
|
protected Number |
n2
|
Fields inherited from class org.barracudamvc.core.forms.DefaultFormValidator |
localLogger, validators |
Constructor Summary | |
RangeValidator()
Public no-args constructor. |
|
RangeValidator(Number low,
Number high)
Public constructor. |
|
RangeValidator(Number low,
Number high,
String ierrmsg)
Public constructor. |
Method Summary | |
Number |
getMaximum()
Get the maximum allowed value |
Number |
getMinimum()
Get the minimum allowed value |
void |
validateFormElement(Object val,
FormElement element,
boolean deferExceptions)
Validate a FormElement to make see if the element equals() a given object |
Methods inherited from class org.barracudamvc.core.forms.DefaultFormValidator |
addValidator, getValidators, removeValidator, validate, validateForm, 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 |
Field Detail |
protected Number n1
protected Number n2
Constructor Detail |
public RangeValidator()
public RangeValidator(Number low, Number high)
low
- the low end of the rangehigh
- the high end of the rangepublic RangeValidator(Number low, Number high, String ierrmsg)
low
- the low end of the rangehigh
- the high end of the rangeierrmsg
- the message associated with this errorMethod Detail |
public Number getMinimum()
public Number getMaximum()
public void validateFormElement(Object val, FormElement element, boolean deferExceptions) throws ValidationException
validateFormElement
in class DefaultFormValidator
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
ValidationException
- if the element is not valid
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |