password_validator 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/password_validator.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a99cce0689e54a71057cded4d67a8052aaca3221
|
4
|
+
data.tar.gz: 307260ff6297a04f694bcb014b4ae2839855c872
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b017b77dfa0999c20a0181bbf93898c7493f3a2740026d9d218f22dedbaa4d2ca3e4ce157a0772a5be830c75282b82cee520a4583c067e6f17f76a62a098b13
|
7
|
+
data.tar.gz: 32c1b348cc2ea31d11bc459b7ff21227456fc322b1c306f28a3dce511b7f6701f3ccc79dac942d6ee652166732b01026c1a370ec16a314f036a1706e859c7d9d
|
data/lib/password_validator.rb
CHANGED
@@ -20,7 +20,7 @@ module ActiveModel
|
|
20
20
|
|
21
21
|
case
|
22
22
|
when blank?
|
23
|
-
record.errors.add(:password, "can't be blank") unless
|
23
|
+
record.errors.add(:password, "can't be blank") unless record.persisted?
|
24
24
|
when too_short?
|
25
25
|
record.errors.add(:password, "must be a minimum of #{options[:min_length]} characters in length")
|
26
26
|
when too_common?
|