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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c7844939b416a1eae71cf0924c1e18d01480a6a
4
- data.tar.gz: 6f398f96ebd6e27abed6829bbc9666d3aff56283
3
+ metadata.gz: 40d62632d0654bfe02902b2cdee0c686b3b5ab1c
4
+ data.tar.gz: c15abebc69b03bee438a78b349514df04f1dcafd
5
5
  SHA512:
6
- metadata.gz: b137d62e47023b4cbc405c6d4388dbe1c5a4ad4dcea493018e7c62b763ad815dd588f571127a7b8d9be550ae6c7c9b40babd3ac7fa88cb9af3eec0720c955f9e
7
- data.tar.gz: 13f66b3fa4835cb00c367fb43db9141eda96c6f37e1b50fce13aa9a77018428cffaaa30830aec7a7a75cb45d8e5ff43c3a04c7434ad8263c02cbbf0821165a16
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
- record.errors.add(
5
- attribute,
6
- :invalid_iban,
7
- message: options[:message],
8
- value: value,
9
- ) unless ISO::IBAN.valid?(value)
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
@@ -1,5 +1,5 @@
1
1
  module Iso
2
2
  module IbanValidation
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iso-iban_validation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Simecek