Mercurial > hg > soundsoftware-site
comparison app/models/.svn/text-base/user.rb.svn-base @ 120:cd2282d2aa55 cannam
Merge from the default branch. Note that this is not a valid SVN repository any more (use default, redmine-1.1 etc for SVN updates).
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 14:33:08 +0000 |
parents | af80e5618e9b 8661b858af72 |
children | 5e974759e8b2 |
comparison
equal
deleted
inserted
replaced
118:b859cc0c4fa1 | 120:cd2282d2aa55 |
---|---|
66 validates_uniqueness_of :login, :if => Proc.new { |user| !user.login.blank? }, :case_sensitive => false | 66 validates_uniqueness_of :login, :if => Proc.new { |user| !user.login.blank? }, :case_sensitive => false |
67 validates_uniqueness_of :mail, :if => Proc.new { |user| !user.mail.blank? }, :case_sensitive => false | 67 validates_uniqueness_of :mail, :if => Proc.new { |user| !user.mail.blank? }, :case_sensitive => false |
68 # Login must contain lettres, numbers, underscores only | 68 # Login must contain lettres, numbers, underscores only |
69 validates_format_of :login, :with => /^[a-z0-9_\-@\.]*$/i | 69 validates_format_of :login, :with => /^[a-z0-9_\-@\.]*$/i |
70 validates_length_of :login, :maximum => 30 | 70 validates_length_of :login, :maximum => 30 |
71 validates_format_of :firstname, :lastname, :with => /^[\w\s\'\-\.]*$/i | |
72 validates_length_of :firstname, :lastname, :maximum => 30 | 71 validates_length_of :firstname, :lastname, :maximum => 30 |
73 validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :allow_nil => true | 72 validates_format_of :mail, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :allow_nil => true |
74 validates_length_of :mail, :maximum => 60, :allow_nil => true | 73 validates_length_of :mail, :maximum => 60, :allow_nil => true |
75 validates_confirmation_of :password, :allow_nil => true | 74 validates_confirmation_of :password, :allow_nil => true |
76 validates_inclusion_of :mail_notification, :in => MAIL_NOTIFICATION_OPTIONS.collect(&:first), :allow_blank => true | 75 validates_inclusion_of :mail_notification, :in => MAIL_NOTIFICATION_OPTIONS.collect(&:first), :allow_blank => true |