X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6cde8c9b0c4220db3b5598a268c197e77258a8cc..cb7340a94ab2673082d07885813ec719e116efe0:/app/models/user.rb diff --git a/app/models/user.rb b/app/models/user.rb index 17985e05f..27ed7b648 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -93,11 +93,9 @@ class User < ActiveRecord::Base validates :display_name, :if => proc { |u| u.display_name_changed? }, :uniqueness => { :case_sensitive => false } validates :display_name, :if => proc { |u| u.display_name_changed? }, - :invalid_chars => true, - :invalid_url_chars => true, - :leading_whitespace => true, - :trailing_whitespace => true - validates :email, :presence => true, :confirmation => true, :invalid_chars => true + :characters => { :url_safe => true }, + :whitespace => { :leading => false, :trailing => false } + validates :email, :presence => true, :confirmation => true, :characters => true validates :email, :if => proc { |u| u.email_changed? }, :uniqueness => { :case_sensitive => false } validates :pass_crypt, :confirmation => true, :length => 8..255