|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentawai.rule.BasicRule
org.mentawai.rule.StringRule
public class StringRule
A rule to validat Strings. It can also check for min and max values.
| Constructor Summary | |
|---|---|
StringRule()
Creates a StringRule. |
|
StringRule(int min)
Creates a StringRule with a min value. |
|
StringRule(int min,
int max)
Creates a StringRule with a min and max values. |
|
| Method Summary | |
|---|---|
boolean |
check(String value)
Check a single input value from this action. |
static StringRule |
getInstance()
|
static StringRule |
getInstance(int min)
|
static StringRule |
getInstance(int min,
int max)
|
Map<String,String> |
getTokens()
Returns a map with tokens that can be used in the error messages. |
| Methods inherited from class org.mentawai.rule.BasicRule |
|---|
check |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringRule()
public StringRule(int min)
min - The min value to validate.
public StringRule(int min,
int max)
min - The min value to validate.max - The max value to validate.| Method Detail |
|---|
public static StringRule getInstance()
public static StringRule getInstance(int min)
public static StringRule getInstance(int min,
int max)
public Map<String,String> getTokens()
Rule
getTokens in interface RulegetTokens in class BasicRulepublic boolean check(String value)
BasicRule
check in class BasicRulevalue - The value to validate.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||