Return to Snippet

Revision: 1369
at September 29, 2006 02:04 by rduv


Initial Code
validates_format_of(:email, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :on => :create, :message=>"has an invalid format") # AND A LOGIN VALIDATION EXAMPLE MIGHT BE validates_format_of :login, :with => /\w+@\w+\.\w{2}/

Initial URL
http://www.rubyonrailsblog.com/

Initial Description

                                

Initial Title
validate email address

Initial Tags

                                

Initial Language
Ruby