aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/secure_password.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib/active_model/secure_password.rb')
-rw-r--r--activemodel/lib/active_model/secure_password.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/secure_password.rb b/activemodel/lib/active_model/secure_password.rb
index cd6256e3d6..cd997a61db 100644
--- a/activemodel/lib/active_model/secure_password.rb
+++ b/activemodel/lib/active_model/secure_password.rb
@@ -63,8 +63,8 @@ module ActiveModel
def password_must_be_strong
if password.present?
- errors.add(:password, "must be longer than 6 characters") unless password.size > 6
- errors.add(:password, "is too weak and common") if WEAK_PASSWORDS.include?(password)
+ errors.add(:password, :too_short, :count => 7) unless password.size > 6
+ errors.add(:password, :unsecure) if WEAK_PASSWORDS.include?(password)
end
end
end