|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Validator
Validator api.
Field Summary | |
---|---|
static String |
FLEXIBLE_RULE_NAME
"flexible" Rule, used in DateFormat Validator |
static String |
FORMAT_RULE_NAME
"format" Rule, used in DateFormat Validator |
static String |
INVALID_NUMBER_RULE_NAME
"invalidNumber" Rule, used in the various Number Validators |
static String |
MASK_RULE_NAME
"mask" Rule, used in StringValidator |
static String |
MAX_LENGTH_RULE_NAME
"maxLength" Rule, used in all validators |
static String |
MAX_VALUE_RULE_NAME
"maxValue" Rule, used in the various Number Validators |
static String |
MIN_LENGTH_RULE_NAME
"minLength" Rule, used in all validators |
static String |
MIN_VALUE_RULE_NAME
"minValue" Rule, used in the various Number Validators |
static String |
REQUIRED_RULE_NAME
"required" Rule, used in all validators |
Method Summary | |
---|---|
void |
assertValidity(Field field)
Determine whether a field meets the criteria specified in the constraints defined for this validator |
void |
assertValidity(String testValue)
Determine whether a testValue meets the criteria specified in the constraints defined for this validator |
String |
getMessage()
Get the last error message resulting from invalid input. |
boolean |
isValid(Field field)
Determine whether a field meets the criteria specified in the constraints defined for this validator |
boolean |
isValid(String testValue)
Deprecated. use isValid(Field) instead |
Field Detail |
---|
static final String FLEXIBLE_RULE_NAME
static final String FORMAT_RULE_NAME
static final String INVALID_NUMBER_RULE_NAME
static final String MASK_RULE_NAME
static final String MAX_LENGTH_RULE_NAME
static final String MAX_VALUE_RULE_NAME
static final String MIN_LENGTH_RULE_NAME
static final String MIN_VALUE_RULE_NAME
static final String REQUIRED_RULE_NAME
Method Detail |
---|
boolean isValid(Field field)
field
- a Field
to be tested
void assertValidity(Field field) throws ValidationException
field
- a Field
to be tested
ValidationException
- containing an error message if the
testValue did not pass the validation tests.boolean isValid(String testValue)
testValue
- a String
to be tested
void assertValidity(String testValue) throws ValidationException
testValue
- a String
to be tested
ValidationException
- containing an error message if the
testValue did not pass the validation tests.String getMessage()
String
message, or the empty String "".
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |