Skip to content

Instantly share code, notes, and snippets.

View creativereason's full-sized avatar

Brian Schwartz creativereason

View GitHub Profile
class Lead < ActiveRecord::Base
attr_accessible :address, :city, :company, :email, :job_title, :name, :phone_number, :state
validates :name, :presence => true
validates :email, :presence => true, :format => { :with => /\A[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]+\z/,
:message => "Valid email only" }
validates :company, :presence => true
end