public class Validation
extends java.lang.Object
| Constructor and Description |
|---|
Validation(Rule rule,
java.util.function.Function valueProvider)
Create a new Validation for an object where the error (if any) will be assigned to the "base" field
|
Validation(Rule rule,
java.util.function.Function valueProvider,
java.lang.String field)
Create a new Validation for an object
|
Validation(Validator validator,
java.util.function.Function valueProvider,
java.lang.String field)
Create a new Validation that will be applied to a nested object of the object to be validated
|
public Validation(Rule rule, java.util.function.Function valueProvider, java.lang.String field)
rule - Rule that should be appliedvalueProvider - Function that returns the value that should be validatedfield - the field in which the error will be assigned in Rule validation failspublic Validation(Rule rule, java.util.function.Function valueProvider)
rule - Rule that should be appliedvalueProvider - Function that returns the value that should be validatedpublic Validation(Validator validator, java.util.function.Function valueProvider, java.lang.String field)
validator - Validator that will be used to validate the nested resourcevalueProvider - Function that returns the value that should be validatedfield - the field in which the error will be assigned in Rule validation fails