grails/grails-core — pull request #518 by droggo (2014-08-04 06:38:34+00:00)
Title: GRAILS-11625 - few more conditionals added to spec

Based on discussion in thread https://groups.google.com/forum/#!topic/grails-dev-discuss/kkkr-l1acws I added checks for few more conditionals. There is one behaviour not clear to me. If we add constraint "age validator:{val -> val > 0}" framework automatically adds "nullable:false" constraint. This happens both in 2.3.x and in 2.4.x. Albo for both @Validatateable and @Validateable(nullable = true). Theoretically it is not valid, because custom validator may not require nullable:false, and I couldn't find such functionality description in docs. If this is intended test should be fine, if this is a bug, let me know and I will modify spec and create JIRA for the issue.

I also modified "!constraints.town.nullable" checks to "constraints.town.nullable == false" as this seems more descriptive for nullable:false constraint and suggests boolean value instead of groovy false.