X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/a187c759b7d96be951e1667080c6e24e2288f166..c43fac76df4751f4b4d04c6f197f5b28229bd624:/app/models/user.rb diff --git a/app/models/user.rb b/app/models/user.rb index 7b57b8710..d6cff0f25 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -13,6 +13,7 @@ class User < ActiveRecord::Base validates_length_of :pass_crypt, :minimum => 8 validates_length_of :display_name, :minimum => 3, :allow_nil => true validates_format_of :email, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i + validates_format_of :display_name, :with => /^[^\/;.,?]*$/ before_save :encrypt_password