Class NumericConstraintValidator

    • Constructor Detail

      • NumericConstraintValidator

        public NumericConstraintValidator​(int expectedPrecision,
                                          int expectedScale)
        Creates the default instance of NumericConstraintValidator with the specified precision and scale.
        Parameters:
        expectedPrecision - the specified precision
        expectedScale - the specified scale
    • Method Detail

      • validate

        public void validate​(BigDecimal actual,
                             HttpModelType httpModelType,
                             String modelName)
        Description copied from interface: ConstraintValidator
        Validates the single actual.

        The state of the actual must not be altered.

        Specified by:
        validate in interface ConstraintValidator<BigDecimal>
        Parameters:
        actual - the actual value to validate
        httpModelType - the http model type
        modelName - the parameter or header name