|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.validation.validator.AbstractValidator<Date> org.apache.wicket.validation.validator.DateValidator
public abstract class DateValidator
Validator for checking dates. This validator can be extended or can be used for one of its static
factory methods to get the default DateValidator
as a range, maximum, or minimum
type.
Constructor Summary | |
---|---|
DateValidator()
|
Method Summary | |
---|---|
static DateValidator |
maximum(Date maximum)
Gets a Date maximum validator for checking if a Date value is
smaller than the given maximum value. |
static DateValidator |
maximum(Date maximum,
String format)
|
static DateValidator |
minimum(Date minimum)
Gets a Date minimum validator for checking if a Date value is
greater than the given minimum Date value. |
static DateValidator |
minimum(Date minimum,
String format)
|
static DateValidator |
range(Date minimum,
Date maximum)
Gets a Date range validator for checking if the Date value falls
between the minimum and maximum Date values. |
static DateValidator |
range(Date minimum,
Date maximum,
String format)
|
Methods inherited from class org.apache.wicket.validation.validator.AbstractValidator |
---|
error, error, error, error, onValidate, resourceKey, validate, validateOnNullValue, variablesMap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DateValidator()
Method Detail |
---|
public static DateValidator range(Date minimum, Date maximum)
Date
range validator for checking if the Date
value falls
between the minimum and maximum Date
values. If that is not the case, an error
message will be generated with the key "DateValidator.range". The message keys that can be
used are:
Component
that failedComponent
- either comes from
FormComponent.labelModel
or resource key [form-id].[form-component-id] in that
order
minimum
- the minimum Date
maximum
- the maximum Date
DateValidator
public static DateValidator range(Date minimum, Date maximum, String format)
minimum
- the minimum Date
maximum
- the maximum Date
format
- The format string used to format the date with SimpleDateFormat
DateValidator
range(Date, Date)
public static DateValidator minimum(Date minimum)
Date
minimum validator for checking if a Date
value is
greater than the given minimum Date
value. If that is not the case, an error
message will be generated with the key "DateValidator.minimum". The message keys that can be
used are:
Component
that failedComponent
- either comes from
FormComponent.labelModel
or resource key [form-id].[form-component-id] in that
order
minimum
- the minimum Date
DateValidator
public static DateValidator minimum(Date minimum, String format)
minimum
- the minimum Date
format
- The format string used to format the date with SimpleDateFormat
DateValidator
minimum(Date)
public static DateValidator maximum(Date maximum)
Date
maximum validator for checking if a Date
value is
smaller than the given maximum value. If that is not the case, an error message will be
generated with the key "DateValidator.maximum". The message keys that can be used are:
Component
that failedComponent
- either comes from
FormComponent.labelModel
or resource key [form-id].[form-component-id] in that
order
maximum
- the maximum Date
DateValidator
public static DateValidator maximum(Date maximum, String format)
maximum
- the maximum Date
format
- The format string used to format the date with SimpleDateFormat
DateValidator
maximum(Date)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |