Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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