Package org.grails.validation

Examples of org.grails.validation.MatchesConstraint


    public String getMatches() {
        if (isNotValidStringType()) {
            throw new MissingPropertyException("Matches constraint only applies to a String property",
                    MATCHES_CONSTRAINT, owningClass);
        }
        MatchesConstraint c = (MatchesConstraint)appliedConstraints.get(MATCHES_CONSTRAINT);
        return c == null ? null : c.getRegex();
    }
View Full Code Here


        if (regex == null) {
            appliedConstraints.remove(MATCHES_CONSTRAINT);
        }
        else {
            if (c == null) {
                c = new MatchesConstraint();
                c.setOwningClass(owningClass);
                c.setPropertyName(propertyName);
                appliedConstraints.put(MATCHES_CONSTRAINT,c);
            }
            c.setParameter(regex);
View Full Code Here

TOP

Related Classes of org.grails.validation.MatchesConstraint

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.