I want to validate the email only if the email has been entered.
I tried the following:
validates :email, :presence => {:message => \"Your emai
This should do the trick.
validates :email,:presence => {:message => "Your email is used to save your greeting."}, :allow_blank => true,:uniqueness => { :case_sensitive => false }
Use:allow_blank => true or :allow_nil => true, :if => :email?
:allow_blank => true
:allow_nil => true, :if => :email?
edit: fix typo.