Browse Source

validate contact for email format

pull/1/head
Nicolae Claudius 13 years ago
parent
commit
f4780217e1
  1. 2
      app/mailers/contact_form.rb

2
app/mailers/contact_form.rb

@ -5,6 +5,8 @@ class ContactForm < MailForm::Base
attribute :file, :attachment => true, :allow_blank => true attribute :file, :attachment => true, :allow_blank => true
attribute :nickname, :captcha => true # antispam attribute :nickname, :captcha => true # antispam
validates :email, email: true
# Declare the e-mail headers. It accepts anything the mail method # Declare the e-mail headers. It accepts anything the mail method
# in ActionMailer accepts. # in ActionMailer accepts.
def headers def headers

Loading…
Cancel
Save