constraint in grails code example
Example 1: constraint in grails
class User {
...
static constraints = {
login shared: "myShared"
}
}
Example 2: constraint in grails
grails.gorm.default.constraints = {
'*'(nullable: true, size: 1..20)
myShared(nullable: false, blank: false)
}