Package org.apache.commons.validator.routines

Examples of org.apache.commons.validator.routines.EmailValidator


    protected void processValidate(Object target, Object propertyValue, Errors errors) {
        if (!email) {
            return;
        }

        EmailValidator emailValidator = EmailValidator.getInstance();
        Object[] args = new Object[] { constraintPropertyName, constraintOwningClass, propertyValue };
        String value = propertyValue.toString();
        if (GrailsStringUtils.isBlank(value)) {
            return;
        }

        if (!emailValidator.isValid(value)) {
            rejectValue(target, errors, ConstrainedProperty.DEFAULT_INVALID_EMAIL_MESSAGE_CODE,
                    ConstrainedProperty.EMAIL_CONSTRAINT + ConstrainedProperty.INVALID_SUFFIX, args);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.validator.routines.EmailValidator

Copyright © 2018 www.massapicom. 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.