iso-iban_validation 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/iso/iban_validation/iban_validator.rb +6 -6
- data/lib/iso/iban_validation/version.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: 40d62632d0654bfe02902b2cdee0c686b3b5ab1c
|
4
|
+
data.tar.gz: c15abebc69b03bee438a78b349514df04f1dcafd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe854831fb1975a9548d7a3220c641802e26d668b2ad961928b322836711d043b55bc98ded8df823ead4b1424e5ed9b851a058464fb277b17d78940991c34610
|
7
|
+
data.tar.gz: e36ed3ef4a6be3569ed3f57587380d082cddfdfe325f59c500d77da9218565757df587b2f533a91ff9ec43f04ec4b04cb7172211d6b5c93739830d4a2eb851d6
|
@@ -1,12 +1,12 @@
|
|
1
1
|
class IbanValidator < ActiveModel::EachValidator
|
2
2
|
|
3
3
|
def validate_each(record, attribute, value)
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
record.errors.add(
|
5
|
+
attribute,
|
6
|
+
:invalid_iban,
|
7
|
+
message: options[:message],
|
8
|
+
value: value,
|
9
|
+
) if value.blank? && !ISO::IBAN.valid?(value)
|
10
10
|
end
|
11
11
|
|
12
12
|
end
|