Skip to content

Instantly share code, notes, and snippets.

@mfollett
Created January 24, 2012 07:38
Show Gist options
  • Save mfollett/1668699 to your computer and use it in GitHub Desktop.
Save mfollett/1668699 to your computer and use it in GitHub Desktop.
groovyist example
class Groovyist {
String username
String password
String email
Long favoritePrime
static constraints = {
username blank: false, unique: true
password size: 5..15, blank: false
email email: true, blank: false
favoritePrime validator: { BigInteger(it).isProbablePrime(99) }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment