T - The target type@FunctionalInterface public interface DigitsValidator<T> extends ConstraintValidator<Digits,T>
Digits validator implementation.VALID| Modifier and Type | Method and Description |
|---|---|
BigDecimal |
getBigDecimal(T value)
Resolve a big decimal for the given value.
|
default boolean |
isValid(T value,
AnnotationValue<Digits> annotationMetadata,
ConstraintValidatorContext context)
Implements the validation logic.
|
isValidinitializedefault boolean isValid(@Nullable T value, @Nonnull AnnotationValue<Digits> annotationMetadata, @Nonnull ConstraintValidatorContext context)
ConstraintValidatorImplementations should be thread-safe and immutable.
value - object to validateannotationMetadata - The annotation metadatacontext - The context objectfalse if value does not pass the constraintBigDecimal getBigDecimal(@Nonnull T value)
value - The value