Added pwned check
This commit is contained in:
@@ -13,6 +13,7 @@ class User < ApplicationRecord
|
||||
|
||||
validates :email, presence: true, uniqueness: true, format: { with: URI::MailTo::EMAIL_REGEXP }
|
||||
validates :password, allow_nil: true, length: { minimum: 12 }
|
||||
validates :password, not_pwned: { message: "might easily be guessed" }
|
||||
|
||||
normalizes :email, with: -> { _1.strip.downcase }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user