public class DateRule extends LocaleRule
| Constructor and Description |
|---|
DateRule()
Creates a rule using the default DateFormat style (SHORT).
|
DateRule(Date min,
Date max)
Creates a rule using the default DateFormat style (SHORT).
|
DateRule(int style)
Creates a rule using the given DateFormat style.
|
DateRule(int style,
Date min,
Date max)
Creates a rule using the given DateFormat style.
|
DateRule(SimpleDateFormat sdf)
Create a rule using the given SimpleDateFormat.
|
DateRule(SimpleDateFormat sdf,
Date min,
Date max)
Create a rule using the given SimpleDateFormat.
|
DateRule(String pattern) |
DateRule(String pattern,
Date min,
Date max) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
check(String value,
Locale locale)
Check a single input value from this action considering its locale.
|
static DateRule |
getInstance() |
Map<String,String> |
getTokens()
Returns a map with tokens that can be used in the error messages.
|
checkpublic DateRule()
public DateRule(Date min, Date max)
min - Can be null or the min date.max - Can be null or the max date.public DateRule(int style)
style - The DateFormat style. (Ex: DateFormat.SHORT, DateFormat.FULL, etc.)public DateRule(int style,
Date min,
Date max)
style - The DateFormat style. (Ex: DateFormat.SHORT, DateFormat.FULL, etc.)min - Can be null or the min date.max - Can be null or the max date.public DateRule(SimpleDateFormat sdf)
sdf - The SimpleDateFormat to use.public DateRule(String pattern)
public DateRule(SimpleDateFormat sdf, Date min, Date max)
sdf - The SimpleDateFormat to use.min - Can be null or the min date.max - Can be null or the max date.public static DateRule getInstance()
public boolean check(String value, Locale locale)
LocaleRulecheck in class LocaleRulevalue - The value to validate.locale - The locale to consider in the validation.public Map<String,String> getTokens()
RulegetTokens in interface RulegetTokens in class LocaleRuleCopyright © 2015. All Rights Reserved.