Validator |
Validator.addError(MultiKey2<String,String> error) |
Adds the given error to the validator error list.
|
Validator |
Validator.requireEquals(Object value,
Object expected,
String fieldName) |
Check if the field value equals the expected value
and, if not, adds the appropriate error against the
field name.
|
Validator |
Validator.requireNotNull(Object value,
String fieldName) |
Checks if the given value is null and, if so,
adds the appropriate error against the field name.
|
Validator |
Validator.requireNotNullOrEmpty(String value,
String fieldName) |
Checks if the given String value is either
null or empty and, if so, adds the appropriate
error against the field name.
|
Validator |
Validator.requireTrue(boolean flag,
String fieldName,
String message) |
If flag is false, then an error is
raised for the given field name and message.
|
<V1,V2> Validator |
Validator.requireTrue(BiPredicate<V1,V2> predicate,
V1 value1,
V2 value2,
String fieldName1,
String fieldName2,
String message) |
If predicate.test(value) returns false,
then the given field name and message are added to the
field errors list.
|
<V> Validator |
Validator.requireTrue(Predicate<V> predicate,
V value,
String fieldName,
String message) |
If predicate.test(value) returns false,
then the given field name and message are added to the
field errors list.
|