Skip to content

Instantly share code, notes, and snippets.

@asuraphel
Created November 8, 2013 11:59
Show Gist options
  • Save asuraphel/7370028 to your computer and use it in GitHub Desktop.
Save asuraphel/7370028 to your computer and use it in GitHub Desktop.
Domain class from Grails in Action book
package com.grailsinaction
class User {
String userId
String password
String homepage
Date dateCreated
static constraints = {
userId(size: 3..20, unique: true)
password( size: 6..8)
homepage( url: true, nullable: true)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment