Skip to content

Instantly share code, notes, and snippets.

@sergiomichels
Created August 21, 2013 14:39
Show Gist options
  • Select an option

  • Save sergiomichels/6295343 to your computer and use it in GitHub Desktop.

Select an option

Save sergiomichels/6295343 to your computer and use it in GitHub Desktop.
Inspect Grails Domain Class constraints
class Test {
String name
Integer age
BigDecimal salary
static constraints = {
name blank: false, maxSize: 60
age min: 18, max: 999
salary blank: false
}
}
//use it directly
println Test.constraints //Map
//get constraints for age directly
println Test.constraints.age
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment