I have this auto generated lines of codes:
EPRole validator: { EPRole r, EPUserEPRole ur ->
if (ur.EPUser == null) return
boolean existing = false
EPUserEPRole.withNewSession {
existing = EPUserEPRole.exists(ur.EPUser.id, r.id)
}
if (existing) {
return 'userRole.exists'
}
}
When I try to compile the code I get 82: unexpected token: validator @ line 82, column 10.
I am new in groovy so any help is appreciated.