public interface Validator
extends javax.validation.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 java.lang.String |
ANN_CONSTRAINT
Annotation used to define a constraint.
|
static java.lang.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> java.util.Set<javax.validation.ConstraintViolation<T>> |
validate(BeanIntrospection<T> introspection,
T object,
java.lang.Class<?>... groups)
Validate the given introspection and object.
|
<T> java.util.Set<javax.validation.ConstraintViolation<T>> |
validate(T object,
java.lang.Class<?>... groups) |
<T> java.util.Set<javax.validation.ConstraintViolation<T>> |
validateProperty(T object,
java.lang.String propertyName,
java.lang.Class<?>... groups) |
<T> java.util.Set<javax.validation.ConstraintViolation<T>> |
validateValue(java.lang.Class<T> beanType,
java.lang.String propertyName,
java.lang.Object value,
java.lang.Class<?>... groups) |
static final java.lang.String ANN_VALID
static final java.lang.String ANN_CONSTRAINT
@NonNull ExecutableMethodValidator forExecutables()
ExecutableMethodValidator
.forExecutables
in interface javax.validation.Validator
@NonNull <T> java.util.Set<javax.validation.ConstraintViolation<T>> validate(@NonNull T object, java.lang.Class<?>... groups)
validate
in interface javax.validation.Validator
@NonNull <T> java.util.Set<javax.validation.ConstraintViolation<T>> validate(@NonNull BeanIntrospection<T> introspection, @NonNull T object, @Nullable java.lang.Class<?>... groups)
T
- The object typeintrospection
- The introspectionobject
- The objectgroups
- The groups@NonNull <T> java.util.Set<javax.validation.ConstraintViolation<T>> validateProperty(@NonNull T object, @NonNull java.lang.String propertyName, java.lang.Class<?>... groups)
validateProperty
in interface javax.validation.Validator
@NonNull <T> java.util.Set<javax.validation.ConstraintViolation<T>> validateValue(@NonNull java.lang.Class<T> beanType, @NonNull java.lang.String propertyName, @Nullable java.lang.Object value, java.lang.Class<?>... groups)
validateValue
in interface javax.validation.Validator
@NonNull static Validator getInstance()
ConstraintValidator
instances and using
Inject
should be preferred.