|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentawai.rule.CrossRule
org.mentawai.rule.EqualRule
public class EqualRule
A validation rule that compares two action input fields for equality.
| Constructor Summary | |
|---|---|
EqualRule(String field1,
String field2)
Creates a EqualRule for comparing the fields given. |
|
| Method Summary | |
|---|---|
boolean |
check(String[] values)
Check different values from an action input for the validation. |
protected String[] |
getFieldsToValidate()
Subclasses should implement this method to indicate which fields from the action input they want to receive for validation. |
static EqualRule |
getInstance(String field1,
String field2)
|
Map<String,String> |
getTokens()
Returns a map with tokens that can be used in the error messages. |
| Methods inherited from class org.mentawai.rule.CrossRule |
|---|
check |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EqualRule(String field1,
String field2)
field1 - The first fieldfield2 - The second file| Method Detail |
|---|
public static EqualRule getInstance(String field1,
String field2)
protected String[] getFieldsToValidate()
CrossRule
getFieldsToValidate in class CrossRulepublic boolean check(String[] values)
CrossRule
check in class CrossRulevalues - The values to compare.
public Map<String,String> getTokens()
Rule
getTokens in interface RulegetTokens in class CrossRule
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||