Interface DecimalMaxValidator<T>
- Type Parameters:
T
- The type to constrain
- All Superinterfaces:
ConstraintValidator<jakarta.validation.constraints.DecimalMax,
,T> jakarta.validation.ConstraintValidator<jakarta.validation.constraints.DecimalMax,
T>
public interface DecimalMaxValidator<T>
extends ConstraintValidator<jakarta.validation.constraints.DecimalMax,T>
Abstract implementation of a validator for
DecimalMax
.- Since:
- 1.2
- Author:
- graemerocher
-
Field Summary
Fields inherited from interface io.micronaut.validation.validator.constraints.ConstraintValidator
VALID
-
Method Summary
Modifier and TypeMethodDescriptionint
doComparison
(T value, @NonNull BigDecimal bigDecimal) Perform the comparison for the given value.default boolean
isValid
(T value, @NonNull io.micronaut.core.annotation.AnnotationValue<jakarta.validation.constraints.DecimalMax> annotationMetadata, @NonNull ConstraintValidatorContext context) Implements the validation logic.Methods inherited from interface io.micronaut.validation.validator.constraints.ConstraintValidator
isValid
Methods inherited from interface jakarta.validation.ConstraintValidator
initialize
-
Method Details
-
isValid
default boolean isValid(@Nullable T value, @NonNull @NonNull io.micronaut.core.annotation.AnnotationValue<jakarta.validation.constraints.DecimalMax> annotationMetadata, @NonNull @NonNull ConstraintValidatorContext context) Description copied from interface:ConstraintValidator
Implements the validation logic.Implementations should be thread-safe and immutable.
- Specified by:
isValid
in interfaceConstraintValidator<jakarta.validation.constraints.DecimalMax,
T> - Parameters:
value
- object to validateannotationMetadata
- The annotation metadatacontext
- The context object- Returns:
false
ifvalue
does not pass the constraint
-
doComparison
Perform the comparison for the given value.- Parameters:
value
- The valuebigDecimal
- The big decimal- Returns:
- The result
-