public interface Validator extends Validator
Valid interface for Micronaut's implementation.
The Validator.getConstraintsForClass(Class) method is not supported by the implementation.
| Modifier and Type | Field and Description |
|---|---|
static String |
ANN_CONSTRAINT
Annotation used to define a constraint.
|
static String |
ANN_VALID
Annotation used to define an object as valid.
|
| Modifier and Type | Method and Description |
|---|---|
ExecutableMethodValidator |
forExecutables()
Overridden variation that returns a
ExecutableMethodValidator. |
static Validator |
getInstance()
Constructs a new default instance.
|
<T> Set<ConstraintViolation<T>> |
validate(BeanIntrospection<T> introspection,
T object,
Class<?>... groups)
Validate the given introspection and object.
|
<T> Set<ConstraintViolation<T>> |
validate(T object,
Class<?>... groups) |
<T> Set<ConstraintViolation<T>> |
validateProperty(T object,
String propertyName,
Class<?>... groups) |
<T> Set<ConstraintViolation<T>> |
validateValue(Class<T> beanType,
String propertyName,
Object value,
Class<?>... groups) |
getConstraintsForClass, unwrapstatic final String ANN_VALID
static final String ANN_CONSTRAINT
@NonNull ExecutableMethodValidator forExecutables()
ExecutableMethodValidator.forExecutables in interface Validator@NonNull <T> Set<ConstraintViolation<T>> validate(@NonNull T object, Class<?>... groups)
@NonNull <T> Set<ConstraintViolation<T>> validate(@NonNull BeanIntrospection<T> introspection, @NonNull T object, @Nullable Class<?>... groups)
T - The object typeintrospection - The introspectionobject - The objectgroups - The groups@NonNull <T> Set<ConstraintViolation<T>> validateProperty(@NonNull T object, @NonNull String propertyName, Class<?>... groups)
validateProperty in interface Validator@NonNull <T> Set<ConstraintViolation<T>> validateValue(@NonNull Class<T> beanType, @NonNull String propertyName, @Nullable Object value, Class<?>... groups)
validateValue in interface Validator@NonNull static Validator getInstance()
ConstraintValidator instances and using
Inject should be preferred.