Created
January 24, 2012 07:38
-
-
Save mfollett/1668699 to your computer and use it in GitHub Desktop.
groovyist example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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