导入错误

dev_aliyun
daiao 5 years ago
parent cb118cb9ff
commit dbb19cf335

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

Loading…
Cancel
Save