Skip to content

Instantly share code, notes, and snippets.

@lobo-tuerto
Created November 14, 2008 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lobo-tuerto/24972 to your computer and use it in GitHub Desktop.
Save lobo-tuerto/24972 to your computer and use it in GitHub Desktop.
property :email, String, :nullable => false, :unique => true, :format => :email_address,
:messages => {
:presence => "We need your email address.",
:is_unique => "We already have that email.",
:format => "Doesn't look like an email address to me ..."
}
#The messages should map to the stuff we are validating, or else the user needs to LOOK for WHAT to set
#This should be better
property :email, String, :nullable => false, :unique => true, :format => :email_address,
:messages => {
:nullable => "We need your email address.",
:unique => "We already have that email.",
:format => "Doesn't look like an email address to me ..."
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment