Skip to content

Commit 936cd8d

Browse files
committed
fix behaviour of constraints applied to derived properties
1 parent 3d96827 commit 936cd8d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

grails-validation/src/main/groovy/org/grails/validation/DefaultConstraintEvaluator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,9 @@ protected Map<String, Constrained> evaluateConstraints(Map<String, Constrained>
170170
// remove the constraint given by user and warn
171171
if (constraintMap.remove(propertyName) != null) {
172172
LOG.warn("Derived domainClassProperties may not be constrained. Property [" + propertyName + "] of domain class " + theClass.getName() + " will not be checked during validation.");
173-
continue;
174173
}
174+
// always remove constraints on derived properties
175+
continue;
175176
}
176177
}
177178
else {

0 commit comments

Comments
 (0)