diff options
author | francis <francis> | 2008-07-09 07:39:08 +0000 |
---|---|---|
committer | francis <francis> | 2008-07-09 07:39:08 +0000 |
commit | 29576f0bb98ba403aa5874409dc32ec82d6fb241 (patch) | |
tree | 3d3c0091f53a535b6b3c68bb56e1716d4bf239fa | |
parent | b48f38d93930e3d92fc68251f65610f9eb157715 (diff) |
Fix terrible wording on contact form errors.
-rw-r--r-- | app/models/contact_validator.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/models/contact_validator.rb b/app/models/contact_validator.rb index 1e88fa8a7..f07d643fa 100644 --- a/app/models/contact_validator.rb +++ b/app/models/contact_validator.rb @@ -15,7 +15,7 @@ # Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: contact_validator.rb,v 1.15 2008-05-21 10:51:24 francis Exp $ +# $Id: contact_validator.rb,v 1.16 2008-07-09 07:39:08 francis Exp $ class ContactValidator < ActiveRecord::BaseWithoutTable column :name, :string @@ -23,7 +23,10 @@ class ContactValidator < ActiveRecord::BaseWithoutTable column :subject, :text column :message, :text - validates_presence_of :name, :email, :subject, :message + validates_presence_of :name, :message => "^Please enter your name" + validates_presence_of :email, :message => "^Please enter your email address" + validates_presence_of :subject, :message => "^Please enter a subject" + validates_presence_of :message, :message => "^Please enter the message you want to send" def validate errors.add(:email, "doesn't look like a valid address") unless MySociety::Validate.is_valid_email(self.email) |