validates_identity-co_cc 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25bdb6cebab6e353da762c792ba622cbdf918a6e976b0b06512e7ef9ae73f460
|
4
|
+
data.tar.gz: 9afe40b56d69be364b29e379a3b56e7d9c4cda24683fcbdb3d6b76d583690d36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a57417fd43d9f67ea2f8e3b87fc1cd0673ae464993f1e99414a59372247bcea7f0e38f0b330fce33f337fbc2ca58ce1a9e377852d03d43fe8f02bc6c0919a5ab
|
7
|
+
data.tar.gz: cb1b52aff39d4dbc7cac44c1767d88d7a60e0306eb11344250cf0e5a02b2f5698bb28fa3119aef2562e12a9b98e66439a26baed2368df062767461a142a674cd
|
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
class ValidatesIdentity
|
4
4
|
module CoCc
|
5
5
|
class Validator
|
6
|
-
VALIDATION_REGULAR_EXPRESSION = /\A\d{
|
6
|
+
VALIDATION_REGULAR_EXPRESSION = /\A\d{8,10}\z/i.freeze
|
7
7
|
|
8
8
|
attr_reader :value
|
9
9
|
|
@@ -13,6 +13,7 @@ class ValidatesIdentity
|
|
13
13
|
|
14
14
|
def valid?
|
15
15
|
return true if value.blank?
|
16
|
+
return false if value.length == 9
|
16
17
|
|
17
18
|
result.present?
|
18
19
|
end
|
@@ -10,5 +10,5 @@ class ValidatesIdentity
|
|
10
10
|
end
|
11
11
|
|
12
12
|
ValidatesIdentity.register_person_identity_type('CO_CC', ValidatesIdentity::CoCc::Validator)
|
13
|
-
ValidatesIdentity::ShouldaMatchers.register_person_allowed_values('CO_CC', %w[
|
14
|
-
ValidatesIdentity::ShouldaMatchers.register_person_disallowed_values('CO_CC', %w[
|
13
|
+
ValidatesIdentity::ShouldaMatchers.register_person_allowed_values('CO_CC', %w[12345678 1234567890])
|
14
|
+
ValidatesIdentity::ShouldaMatchers.register_person_disallowed_values('CO_CC', %w[1234567 123456789 12345678901])
|