aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/user.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 7f85a2c4f..8c53c0d05 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -31,11 +31,11 @@ require 'digest/sha1'
class User < ActiveRecord::Base
strip_attributes!
- validates_presence_of :email, :message => "^Please enter your email address"
+ validates_presence_of :email, :message => N_("Please enter your email address")
- validates_presence_of :name, :message => "^Please enter your name"
+ validates_presence_of :name, :message => N_("Please enter your name")
- validates_presence_of :hashed_password, :message => "^Please enter a password"
+ validates_presence_of :hashed_password, :message => N_("Please enter a password")
has_many :info_requests, :order => 'created_at desc'
has_many :user_info_request_sent_alerts
@@ -46,7 +46,7 @@ class User < ActiveRecord::Base
has_many :censor_rules, :order => 'created_at desc'
attr_accessor :password_confirmation, :no_xapian_reindex
- validates_confirmation_of :password, :message =>"^Please enter the same password twice"
+ validates_confirmation_of :password, :message => N_("Please enter the same password twice")
validates_inclusion_of :admin_level, :in => [
'none',
@@ -103,10 +103,10 @@ class User < ActiveRecord::Base
def validate
if self.email != "" && !MySociety::Validate.is_valid_email(self.email)
- errors.add(:email, "^Please enter a valid email address")
+ errors.add(:email, N_("Please enter a valid email address"))
end
if MySociety::Validate.is_valid_email(self.name)
- errors.add(:name, "^Please enter your name, not your email address, in the name field.")
+ errors.add(:name, N_("Please enter your name, not your email address, in the name field."))
end
end