iban_bic 1.4.0 → 1.4.1
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/README.md +4 -0
- data/lib/active_model/validations/bic_validator.rb +1 -1
- data/lib/iban_bic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 38a619312e6705eacf447c6a99e53c17248dec59
|
|
4
|
+
data.tar.gz: ef5eb8a721913d59c7b73e8bb42230119917ce00
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bc838ce23198c4566aea393512a5913f18bc0d3168ae0eabf1fd27dfaae66d0181d5b48a4b9071c67e08bc98d0b9cd78a7bc7b990e7ca98767d7b3f2e873fccb
|
|
7
|
+
data.tar.gz: 45bfbd9492b070f24c7c7fb99a79b975dd8b0b9f0dcd1fd878181776a1897b55e0d60cdd8d34b62da32e2373b66774919a2b9c10cbf913a6fea1868bb66d08f5
|
data/README.md
CHANGED
|
@@ -140,6 +140,10 @@ $ bundle exec rails generate iban_bic:install --with-static-data
|
|
|
140
140
|
4. Customize initializer if needed, adding validations for new countries, or overriding YAML files.
|
|
141
141
|
|
|
142
142
|
## Changelog
|
|
143
|
+
#### 1.4.1
|
|
144
|
+
|
|
145
|
+
* Fixed BIC validation, don't allow less 1 or 2 characters for the office code and don't allow to add extra characters at the begining or at the end of the string.
|
|
146
|
+
|
|
143
147
|
#### 1.4.0
|
|
144
148
|
|
|
145
149
|
* BIC validation moved from BIC model to an independent validator.
|
|
@@ -10,7 +10,7 @@ module ActiveModel
|
|
|
10
10
|
class BicValidator < ActiveModel::EachValidator
|
|
11
11
|
def validate_each(record, attribute, value)
|
|
12
12
|
country_field = options[:country] ? record[options[:country]] : "[A-Z]{2}"
|
|
13
|
-
unless
|
|
13
|
+
unless /^[A-Z]{4}#{country_field}[0-9A-Z]{2}([0-9A-Z]{3})?$/.match? value.upcase
|
|
14
14
|
record.errors.add(attribute, :invalid_format)
|
|
15
15
|
end
|
|
16
16
|
end
|
data/lib/iban_bic/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: iban_bic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.
|
|
4
|
+
version: 1.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Leonardo Diez
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-02-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|