You can use the grails.util.Holders
class to get access to the configuration object as follows:
In Config.groovy
:
myMaxSize = 10
In your domain class:
class User {
String name
static constraints = {
name minSize: Holders.config.myMaxSize
}
}