|
||||||||||
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.DateRangeValidator
public class DateRangeValidator
This validator ensures that a value is within a given date range
Field Summary | |
---|---|
protected Date |
myEndDate
|
protected Date |
myStartDate
|
Fields inherited from class org.barracudamvc.core.forms.DefaultFormValidator |
---|
localLogger, validators |
Constructor Summary | |
---|---|
DateRangeValidator()
Public no-args constructor. |
|
DateRangeValidator(Date theStartDate,
Date theEndDate)
Public constructor. |
|
DateRangeValidator(Date theStartDate,
Date theEndDate,
String theErrMsg)
Public constructor. |
Method Summary | |
---|---|
Date |
getEndDate()
Return the maximum date value |
Date |
getStartDate()
Return the minimum date 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 Date myStartDate
protected Date myEndDate
Constructor Detail |
---|
public DateRangeValidator()
public DateRangeValidator(Date theStartDate, Date theEndDate)
theStartDate
- the low end of the rangetheEndDate
- the high end of the rangepublic DateRangeValidator(Date theStartDate, Date theEndDate, String theErrMsg)
theStartDate
- the low end of the rangetheEndDate
- the high end of the rangetheErrMsg
- the message associated with this errorMethod Detail |
---|
public Date getStartDate()
public Date getEndDate()
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 |