public class NoteAllValidator
extends java.lang.Object
In this mode each validation predicate will be evaluated and errors are gathered with a message into a List
or ValidlyNote object provided.
The evaluation process will stop without completing all the predicates in the following cases:
1. The first predicate (mustNotBeNull etc. in PreCondition) fails.
2. Function given to ValidationEngine.mustConvert(java.util.function.Function<T, NEW_TYPE>, java.lang.String) throws an exception or returns a null.
3. Predicate given to ValidationEngine.mustFatally(java.util.function.Predicate<T>, java.lang.String) fails.
| Constructor and Description |
|---|
NoteAllValidator() |
| Modifier and Type | Method and Description |
|---|---|
static PreConditionInteger |
valid(java.lang.Integer value,
java.util.List<java.lang.String> note)
Starts a type
Integer validation rule with List note. |
static PreConditionInteger |
valid(java.lang.Integer value,
java.lang.String fieldName,
ValidlyNote note)
Starts a type
Integer validation rule with ValidlyNote note. |
static PreConditionString |
valid(java.lang.String value,
java.util.List<java.lang.String> note)
Starts a type
String validation rule with List note. |
static PreConditionString |
valid(java.lang.String value,
java.lang.String fieldName,
ValidlyNote note)
Starts a type
String validation rule with ValidlyNote note. |
static <T> PreCondition<T,ValidationEngine> |
valid(T value,
java.util.List<java.lang.String> note)
Starts a type
T validation rule with List note. |
static <T> PreCondition<T,ValidationEngine> |
valid(T value,
java.lang.String fieldName,
ValidlyNote note)
Starts a type
T validation rule with ValidlyNote note. |
public static PreConditionString valid(java.lang.String value, java.lang.String fieldName, ValidlyNote note)
String validation rule with ValidlyNote note.value - value being validatedfieldName - identifier for this validation rulenote - notification object where the messages with the identifier are gatheredPreConditionString for defining the first predicatepublic static PreConditionString valid(java.lang.String value, java.util.List<java.lang.String> note)
String validation rule with List note.value - value being validatednote - notification object where the messages are gatheredPreConditionString for defining the first predicatepublic static PreConditionInteger valid(java.lang.Integer value, java.lang.String fieldName, ValidlyNote note)
Integer validation rule with ValidlyNote note.value - value being validatedfieldName - identifier for this validation rulenote - notification object where the messages with the identifier are gatheredPreConditionInteger for defining the first predicatepublic static PreConditionInteger valid(java.lang.Integer value, java.util.List<java.lang.String> note)
Integer validation rule with List note.value - value being validatednote - notification object where the messages are gatheredPreConditionInteger for defining the first predicatepublic static <T> PreCondition<T,ValidationEngine> valid(T value, java.lang.String fieldName, ValidlyNote note)
T validation rule with ValidlyNote note.value - value being validatedfieldName - identifier for this validation rulenote - notification object where the messages with the identifier are gatheredPreCondition for defining the first predicatepublic static <T> PreCondition<T,ValidationEngine> valid(T value, java.util.List<java.lang.String> note)
T validation rule with List note.value - value being validatednote - notification object where the messages are gatheredPreCondition for defining the first predicate