|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentawai.rule.CrossRule
public abstract class CrossRule
A rule that compares two or more action input fields for validation.
| Constructor Summary | |
|---|---|
CrossRule()
|
|
| Method Summary | |
|---|---|
abstract boolean |
check(String[] values)
Check different values from an action input for the validation. |
boolean |
check(String field,
Action action)
Check and validate the given field from the give action. |
protected abstract String[] |
getFieldsToValidate()
Subclasses should implement this method to indicate which fields from the action input they want to receive for validation. |
Map<String,String> |
getTokens()
Returns a map with tokens that can be used in the error messages. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CrossRule()
| Method Detail |
|---|
protected abstract String[] getFieldsToValidate()
public abstract boolean check(String[] values)
values - The values to compare.
public boolean check(String field,
Action action)
Rule
check in interface Rulefield - The field to validate.action - The action from where to get the field.
public Map<String,String> getTokens()
Rule
getTokens in interface Rule
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||