private boolean validateMaxDecimal(Object validationObject, Annotation annotate)
    {
        if (validationObject != null)
        {
            try
            {
                if (checkvalidDeciDigitTypes(validationObject.getClass()))
                {
                    BigDecimal maxValue = NumberUtils.createBigDecimal(((DecimalMax) annotate).value());
                    BigDecimal actualValue = NumberUtils.createBigDecimal(toString(validationObject));
                    int res = actualValue.compareTo(maxValue);
                    if (res >  0)
                    {
                        throwValidationException(((DecimalMax) annotate).message());
                    }

                }
            }
            catch (NumberFormatException nfe)
            {
                throw new RuleValidationException(nfe.getMessage());
            }

        }
        return true;
    }
private boolean validateMaxDecimal ( Object validationObject , Annotation annotate ) { if ( validationObject != null ) { try { if ( checkvalidDeciDigitTypes ( validationObject . getClass ( ) ) ) { BigDecimal maxValue = NumberUtils . createBigDecimal ( ( ( DecimalMax ) annotate ) . value ( ) ) ; BigDecimal actualValue = NumberUtils . createBigDecimal ( toString ( validationObject ) ) ; int res = actualValue . compareTo ( maxValue ) ; if ( res > 0 ) { throwValidationException ( ( ( DecimalMax ) annotate ) . message ( ) ) ; } } } catch ( NumberFormatException nfe ) { throw new RuleValidationException ( nfe . getMessage ( ) ) ; } } return true ; }
Checks whether a given value is a valid maximum decimal digit when compared to given value
or not

@param validationObject
@param annotate
@return