summaryrefslogtreecommitdiffstats
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-07-03 12:37:57 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-07-03 12:37:57 +0000
commitf2af44b6feb9266c675427cd7390bb447dc9564b (patch)
tree420870cd77356fffbe8185ba10e322d260d6eea4 /app/models/user.rb
parent37aba18c8f1e7af58aaaf0a95a61e55bb9f2bbb5 (diff)
downloadredmine-f2af44b6feb9266c675427cd7390bb447dc9564b.tar.gz
redmine-f2af44b6feb9266c675427cd7390bb447dc9564b.zip
Do not show 2 validation errors when user mail is blank.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6168 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index c06a907fe..1b7680182 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -69,7 +69,7 @@ class User < Principal
validates_format_of :login, :with => /^[a-z0-9_\-@\.]*$/i
validates_length_of :login, :maximum => 30
validates_length_of :firstname, :lastname, :maximum => 30
- validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :allow_nil => true
+ validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :allow_blank => true
validates_length_of :mail, :maximum => 60, :allow_nil => true
validates_confirmation_of :password, :allow_nil => true
validates_inclusion_of :mail_notification, :in => MAIL_NOTIFICATION_OPTIONS.collect(&:first), :allow_blank => true