|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentawai.rule.LocaleRule
org.mentawai.rule.DateRule
public class DateRule
| Constructor Summary | |
|---|---|
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)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.mentawai.rule.LocaleRule |
|---|
check |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public 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 DateRule(String pattern,
Date min,
Date max)
| Method Detail |
|---|
public static DateRule getInstance()
public boolean check(String value,
Locale locale)
LocaleRule
check in class LocaleRulevalue - The value to validate.locale - The locale to consider in the validation.
public Map<String,String> getTokens()
Rule
getTokens in interface RulegetTokens in class LocaleRule
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||