Details
-
Type:
New Feature
-
Status:
Reopened
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.1-beta2
-
Fix Version/s: None
-
Component/s: Persistence
-
Labels:None
Description
Currently custom constraints can be added using the Config.groovy class as described inhttp://www.zorched.net/2008/01/26/custom-validators-in-grails-in-a-single-app/
E.g.: org.codehaus.groovy.grails.validation.ConstrainedProperty.registerNewConstraint(
PostalCodeConstraint.POSTAL_CODE_CONSTRAINT, PostalCodeConstraint.class)
I think it would be great if constraints can be added by convention.
E.g. add the PostcodeConstraint to some folder/package (utils?) and that Grails picks it up automatically and registers it. Just like it does it with the Codecs.
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits