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

Examples of org.internna.iwebmvc.core.validation.annotation.DateConstraint.required()


     */
    protected Set<ValidationError> validateDateConstraint(final Field field, final Object object) {
        final DateConstraint dateConstraint = field.getAnnotation(DateConstraint.class);
        Set<ValidationError> errors = new HashSet<ValidationError>();
        if (dateConstraint != null) {
            if (dateConstraint.required() & (object == null)) errors.add(new ValidationError(field.getName(), errorCodes[0], dateConstraint, object));
            if (object != null) {
                Calendar min = dateConstraint.minValue().getDate(false);
                Calendar max = dateConstraint.maxValue().getDate(true);
                Calendar date = Calendar.getInstance();
                date.setTime((Date) object);
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.