org.loom.validator.date
Class DateValidator
java.lang.Object
org.loom.validator.AbstractPropertyValidator
org.loom.validator.date.DateValidator
- All Implemented Interfaces:
- FormInputDecorator, PropertyValidator
public class DateValidator
- extends AbstractPropertyValidator
Class that contains data and behaviour to validate one field.
This class and its descendants are thread-safe.
Methods inherited from class org.loom.validator.AbstractPropertyValidator |
getMessagePrefix, getOverridenMessageKey, getPropertyPath, isBindMessages, isValidateCollectionContainer, pushPropertyPath, setBindMessages, setMessagePrefix, setOverridenMessageKey, setPropertyPath, setValidateCollectionContainer, validateCollectionContainer |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DateValidator
public DateValidator()
validate
public void validate(ValidationRequest request,
java.lang.Object v)
- Validates one input value and adds to errors any validation error found
- Parameters:
v
- the value to validate
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
setMaxValue
public void setMaxValue(DateValue maxValue)
setMinValue
public void setMinValue(DateValue minValue)
toDateTime
protected org.joda.time.DateTime toDateTime(java.lang.Object v)
- Convert any kind of Date object to joda
decorate
public void decorate(FormInputTag t)
- Description copied from class:
AbstractPropertyValidator
- Add attributes to the tag based on this Validator instance metadata
- Specified by:
decorate
in interface FormInputDecorator
- Overrides:
decorate
in class AbstractPropertyValidator
- Parameters:
t
- the tag to be modified
isExcludeMax
public boolean isExcludeMax()
setExcludeMax
public void setExcludeMax(boolean excludeMax)
isExcludeMin
public boolean isExcludeMin()
setExcludeMin
public void setExcludeMin(boolean excludeMin)
getMaxValue
public DateValue getMaxValue()
getMinValue
public DateValue getMinValue()