Package org.internna.iwebmvc.core.validation.annotation

Examples of org.internna.iwebmvc.core.validation.annotation.NumberConstraint.maxValue()


        if (numberConstraint != null) {
            if (numberConstraint.required() & (object == null)) errors.add(new ValidationError(field.getName(), errorCodes[0], numberConstraint, object));
            if (object != null) {
                double numericValue = ((Number) object).doubleValue();
                if (numberConstraint.minValue() > numericValue) errors.add(new ValidationError(field.getName(), errorCodes[2], numberConstraint, object));
                if (numberConstraint.maxValue() < numericValue) errors.add(new ValidationError(field.getName(), errorCodes[3], numberConstraint, object));
            }
        }
        return errors;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.