Skip to content

Instantly share code, notes, and snippets.

@verdi327
Created April 3, 2012 21:52
Show Gist options
  • Save verdi327/2295760 to your computer and use it in GitHub Desktop.
Save verdi327/2295760 to your computer and use it in GitHub Desktop.
validates :full_name, :email_address, :presence => true
validates_format_of :email_address, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/
validate :email_address, :uniqueness => true
validate :display_name, :length => {:minimum => 2, :maximum => 32 }, :allow_nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment