class Feedback < ActiveRecord::Base
acts_as_audited
validates_presence_of :name, :message => "..hey you can't be anonymous!", :on => :create
validates_presence_of :email, :message => "..I need your contact details.", :on => :create
validates_presence_of :topic, :message => "..what are you writing to me about?", :on => :create
validates_presence_of :message, :message => "..so you were saying?", :on => :create
validates_format_of :email, :with => /^([^@\s]{1}+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :message => "..it should look something like yourname@something.com", :on => :create
validates_length_of :message, :minimum => 5, :message => "..uhm, can you be more specific?"
validates_length_of :name, :minimum => 3, :message => "..uhm, can you be more specific?"
validates_length_of :topic, :minimum => 5, :message => "..uhm, can you be more specific?"
end