|
|
|
@ -308,7 +308,7 @@ class User < Principal
|
|
|
|
|
#validates_presence_of :login, :mail, :if => Proc.new { |user| !user.is_a?(AnonymousUser) }
|
|
|
|
|
validates_presence_of :login, :if => Proc.new { |user| !user.is_a?(AnonymousUser) }
|
|
|
|
|
validates_uniqueness_of :login, :if => Proc.new { |user| user.login_changed? && user.login.present? }, :case_sensitive => false
|
|
|
|
|
validates_uniqueness_of :mail, :if => Proc.new { |user| user.mail_changed? && user.mail.present? }, :case_sensitive => false
|
|
|
|
|
#validates_uniqueness_of :mail, :if => Proc.new { |user| user.mail_changed? && user.mail.present? }, :case_sensitive => false
|
|
|
|
|
validates_uniqueness_of :phone, :if => Proc.new { |user| user.phone_changed? && user.phone.present? }, :case_sensitive => false
|
|
|
|
|
# Login must contain letters, numbers, underscores only
|
|
|
|
|
#validates_format_of :login, :with => /\A[a-z0-9_\-]*\z/i
|
|
|
|
|