debitcard_validator 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_model/validations/debitcard_validator.rb +2 -2
- data/lib/debitcard_validator/version.rb +1 -1
- data/locales/en.yml +5 -0
- data/locales/ja.yml +5 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce664a091f8ccc5420c5c8d046ed009b084d752d
|
4
|
+
data.tar.gz: 415bf9b39b7354f3df688bc6654087e6d9cc1eed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 294eedaaa80f4a836d240544f9f0d3912e92990a39a44e274e7d1ddbe461d6f80198dba6153b8c12b0eee047bca2c74be9dbd35536d992545a5a82baa5b7cc47
|
7
|
+
data.tar.gz: d74d4c77f10fbd841e98042e2288a9ce17e50dc6487ea434b22853bc106f2248c8111a1b004d049e1f5626aa687c0f041fec6703a8ed897536d339edfa75600d
|
@@ -6,11 +6,11 @@ module ActiveModel
|
|
6
6
|
def validate_each(record, attribute, value)
|
7
7
|
value = trim_number(value)
|
8
8
|
if value =~ debitcard_regexes
|
9
|
-
record.errors.add(attribute, 'is debitcard.')
|
9
|
+
record.errors.add(attribute, :is_debitcard || 'is debitcard.')
|
10
10
|
end
|
11
11
|
|
12
12
|
if value =~ prepaidcard_regexes
|
13
|
-
record.errors.add(attribute, 'is prepaidcard.')
|
13
|
+
record.errors.add(attribute, :is_prepaidcard || 'is prepaidcard.')
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
data/locales/en.yml
ADDED
data/locales/ja.yml
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: debitcard_validator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuta Kurotaki
|
@@ -86,6 +86,8 @@ files:
|
|
86
86
|
- lib/active_model/validations/debitcard_validator.rb
|
87
87
|
- lib/debitcard_validator.rb
|
88
88
|
- lib/debitcard_validator/version.rb
|
89
|
+
- locales/en.yml
|
90
|
+
- locales/ja.yml
|
89
91
|
homepage: https://github.com/kurotaky/debitcard_validator
|
90
92
|
licenses: []
|
91
93
|
metadata: {}
|