finished write-up for broken auth
This commit is contained in:
+7
-1
@@ -5,7 +5,13 @@ class User < ActiveRecord::Base
|
||||
:length => {:within => 6..40},
|
||||
:on => :create,
|
||||
:if => :password#,
|
||||
#:format => {:with => /\A.*(?=.{10,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[\@\#\$\%\^\&\+\=]).*\z/}
|
||||
=begin :format => {:with => /\A.*(?=.{10,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[\@\#\$\%\^\&\+\=]).*\z/}
|
||||
validates :password, :presence => true,
|
||||
:confirmation => true,
|
||||
:on => :update,
|
||||
:if => :password,
|
||||
:format => {:with => /\A.*(?=.{10,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[\@\#\$\%\^\&\+\=]).*\z/}
|
||||
=end
|
||||
validates_presence_of :email
|
||||
validates_uniqueness_of :email
|
||||
validates_format_of :email, :with => /.+@.+\..+/i
|
||||
|
||||
Reference in New Issue
Block a user