bank-contact 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -23
- data/Rakefile +5 -5
- data/bank.gemspec +10 -10
- data/data/iban.yml +265 -166
- data/lib/bank.rb +4 -4
- data/lib/bank/bban.rb +10 -10
- data/lib/bank/bic.rb +14 -15
- data/lib/bank/contact.rb +7 -7
- data/lib/bank/iban.rb +13 -13
- data/lib/bank/validators/iban_validator.rb +1 -1
- data/lib/bank/version.rb +1 -1
- data/spec/activemodel_spec.rb +10 -11
- data/spec/bic_spec.rb +64 -0
- data/spec/contact_spec.rb +13 -12
- data/spec/iban_spec.rb +114 -115
- data/spec/spec_helper.rb +1 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a634611f8033bbb771984e23f9c52d0d42430358
|
4
|
+
data.tar.gz: aee62a415954e8aebd42d3cc257301a6a975987a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c20be34292875bb16535a1f4bd70949f84488ac89ab340b4edce6c7be0e7ff3fdfc3ee1dce936962441dcb3634823d6244abd93290cfcb8ca6bb1c7686785bef
|
7
|
+
data.tar.gz: 5d0086e752090a6dd1f15a4d595ff4827a73e40abc81177068d286d090d8daecce690fdfd5041417e9e19233a706915e5e7ceb2cc9c30bc3cd94f81f72b7f6dc
|
data/README.md
CHANGED
@@ -25,25 +25,25 @@ Or install it yourself as:
|
|
25
25
|
|
26
26
|
require 'bank/iban'
|
27
27
|
|
28
|
-
iban = Bank::IBAN.new(
|
28
|
+
iban = Bank::IBAN.new('DE89 3704 0044 0532 0130 00')
|
29
29
|
|
30
|
-
iban.country_code #
|
31
|
-
iban.check_digits #
|
30
|
+
iban.country_code # 'DE'
|
31
|
+
iban.check_digits # '89'
|
32
32
|
iban.bban # <Bank::BBAN...>
|
33
|
-
iban.bban.to_s #
|
34
|
-
iban.account_number #
|
35
|
-
iban.bank_identifier #
|
33
|
+
iban.bban.to_s # '370400440532013000'
|
34
|
+
iban.account_number # '0532013000'
|
35
|
+
iban.bank_identifier # '37040044'
|
36
36
|
|
37
37
|
iban.valid? # true
|
38
38
|
|
39
|
-
iban.to_s #
|
40
|
-
iban.to_s(true) #
|
39
|
+
iban.to_s # 'DE89370400440532013000'
|
40
|
+
iban.to_s(true) # 'DE89 3704 0044 0532 0130 00'
|
41
41
|
|
42
42
|
iban.to_i # 370400440532013000131489
|
43
|
-
|
44
|
-
# or
|
45
|
-
|
46
|
-
Bank::IBAN.valid?
|
43
|
+
|
44
|
+
# or
|
45
|
+
|
46
|
+
Bank::IBAN.valid? 'DE89 3704 0044 0532 0130 00' # true
|
47
47
|
|
48
48
|
or as ActiveModel Validator (make sure you have 'active_model' in your Gemfile)
|
49
49
|
|
@@ -52,19 +52,19 @@ or as ActiveModel Validator (make sure you have 'active_model' in your Gemfile)
|
|
52
52
|
attr_accessor :iban
|
53
53
|
validates :iban, iban: true
|
54
54
|
end
|
55
|
-
|
56
|
-
### Bank::BIC
|
57
|
-
|
55
|
+
|
56
|
+
### Bank::BIC
|
57
|
+
|
58
58
|
require 'bank/bic'
|
59
|
-
|
59
|
+
|
60
60
|
bic = Bank::BIC.new('BYLADEM1203')
|
61
61
|
bic.bank_code
|
62
62
|
bic.country_code
|
63
63
|
bic.location_code
|
64
|
-
bic.branch_code
|
64
|
+
bic.branch_code
|
65
65
|
bic.to_s
|
66
66
|
bic.valid?
|
67
|
-
|
67
|
+
|
68
68
|
or as ActiveModel Validator (make sure you have 'active_model' in your Gemfile)
|
69
69
|
|
70
70
|
class Company
|
@@ -72,19 +72,19 @@ or as ActiveModel Validator (make sure you have 'active_model' in your Gemfile)
|
|
72
72
|
attr_accessor :bic
|
73
73
|
validates :bic, bic: true
|
74
74
|
end
|
75
|
-
|
75
|
+
|
76
76
|
### Bank::Contact
|
77
|
-
|
77
|
+
|
78
78
|
require 'bank/contact' # this requires 'iban' and 'bic'
|
79
|
-
|
79
|
+
|
80
80
|
# paramters: IBAN, BIC
|
81
|
-
contact = Bank::Contact.new(
|
81
|
+
contact = Bank::Contact.new('DE89 3704 0044 0532 0130 00', 'BYLADEM1203')
|
82
82
|
contact.iban
|
83
83
|
contact.bic
|
84
84
|
contact.to_h
|
85
85
|
contact.to_a
|
86
86
|
contact.valid?
|
87
|
-
|
87
|
+
|
88
88
|
|
89
89
|
## Contributing
|
90
90
|
|
data/Rakefile
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rake/testtask'
|
3
3
|
|
4
4
|
Rake::TestTask.new do |t|
|
5
5
|
t.pattern = 'spec/**/*_spec.rb'
|
6
6
|
t.libs << 'spec'
|
7
7
|
end
|
8
8
|
|
9
|
-
desc
|
9
|
+
desc 'Run tests'
|
10
10
|
task :default => :test
|
11
11
|
|
12
|
-
desc
|
12
|
+
desc 'Run console'
|
13
13
|
task :console do
|
14
14
|
require 'irb'
|
15
15
|
require 'irb/completion'
|
16
16
|
require 'bank/contact'
|
17
17
|
ARGV.clear
|
18
18
|
IRB.start
|
19
|
-
end
|
19
|
+
end
|
data/bank.gemspec
CHANGED
@@ -4,22 +4,22 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'bank/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'bank-contact'
|
8
8
|
spec.version = Bank::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
9
|
+
spec.authors = ['Kevin']
|
10
|
+
spec.email = ['kevin.melchert@gmail.com']
|
11
11
|
spec.summary = %q{IBAN + SWIFT/BIC}
|
12
12
|
spec.description = %q{IBAN + SWIFT/BIC: Information, Validation and Formatting.}
|
13
|
-
spec.homepage =
|
14
|
-
spec.license =
|
13
|
+
spec.homepage = ''
|
14
|
+
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = [
|
19
|
+
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_development_dependency
|
22
|
-
spec.add_development_dependency
|
23
|
-
spec.add_development_dependency
|
24
|
-
spec.add_development_dependency 'activemodel',
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.5'
|
22
|
+
spec.add_development_dependency 'rake'
|
23
|
+
spec.add_development_dependency 'minitest', '~> 4.2'
|
24
|
+
spec.add_development_dependency 'activemodel', '~> 4.0.0'
|
25
25
|
end
|
data/data/iban.yml
CHANGED
@@ -3,384 +3,487 @@
|
|
3
3
|
|
4
4
|
al: # Albania
|
5
5
|
length: 28
|
6
|
-
|
7
|
-
|
6
|
+
regexp: >
|
7
|
+
(?<bank_identifier> \d{8})
|
8
|
+
(?<account_number> [A-Z0-9]{16})
|
8
9
|
|
9
10
|
ad: # Andorra
|
10
11
|
length: 24
|
11
|
-
|
12
|
-
|
12
|
+
regexp: >
|
13
|
+
(?<bank_identifier> \d{4})
|
14
|
+
(?<branch_identifier> \d{4})
|
15
|
+
(?<account_number> [A-Z0-9]{12})
|
13
16
|
|
14
17
|
at: # Austria
|
15
18
|
length: 20
|
16
|
-
|
17
|
-
|
19
|
+
regexp: >
|
20
|
+
(?<bank_identifier> \d{5})
|
21
|
+
(?<account_number> \d{11})
|
18
22
|
|
19
23
|
az: # Azerbaijan
|
20
24
|
length: 28
|
21
|
-
|
22
|
-
|
25
|
+
regexp: >
|
26
|
+
(?<bank_identifier> [A-Z0-9]{4})
|
27
|
+
(?<account_number> \d{20})
|
23
28
|
|
24
29
|
bh: # Bahrain
|
25
30
|
length: 22
|
26
|
-
|
27
|
-
|
28
|
-
|
31
|
+
regexp: >
|
32
|
+
(?<bank_identifier> [A-Z]{4})
|
33
|
+
(?<account_number> [A-Z0-9]{14})
|
34
|
+
|
29
35
|
be: # Belgium
|
30
36
|
length: 16
|
31
|
-
|
32
|
-
|
33
|
-
|
37
|
+
regexp: >
|
38
|
+
(?<bank_identifier> \d{3})
|
39
|
+
(?<account_number> \d{7})
|
40
|
+
(?<national_check_digits> \d{2})
|
41
|
+
|
34
42
|
ba: # Bosnia and Herzegovina
|
35
43
|
length: 20
|
36
|
-
|
37
|
-
|
38
|
-
|
44
|
+
regexp: >
|
45
|
+
(?<bank_identifier> \d{3})
|
46
|
+
(?<branch_identifier> \d{3})
|
47
|
+
(?<account_number> \d{8})
|
48
|
+
(?<national_check_digits> \d{2})
|
49
|
+
|
39
50
|
br: # Brazil
|
40
51
|
length: 29
|
41
|
-
|
42
|
-
|
43
|
-
|
52
|
+
regexp: >
|
53
|
+
(?<bank_identifier> \d{8})
|
54
|
+
(?<branch_identifier> \d{5})
|
55
|
+
(?<account_number> \d{10})
|
56
|
+
(?<account_type> [A-Z])
|
57
|
+
(?<account_owner> [A-Z0-9])
|
58
|
+
|
44
59
|
bg: # Bulgaria
|
45
60
|
length: 22
|
46
|
-
|
47
|
-
|
61
|
+
regexp: >
|
62
|
+
(?<bank_identifier> [A-Z]{4})
|
63
|
+
(?<branch_identifier> \d{4})
|
64
|
+
(?<account_type> \d{2})
|
65
|
+
(?<account_number> [A-Z0-9]{8})
|
48
66
|
|
49
67
|
cr: # Costa Rica
|
50
68
|
length: 21
|
51
|
-
|
52
|
-
|
69
|
+
regexp: >
|
70
|
+
(?<bank_identifier> \d{3})
|
71
|
+
(?<account_number> \d{14})
|
53
72
|
|
54
73
|
hr: # Croatia
|
55
74
|
length: 21
|
56
|
-
|
57
|
-
|
58
|
-
|
75
|
+
regexp: >
|
76
|
+
(?<bank_identifier> \d{7})
|
77
|
+
(?<account_number> \d{10})
|
78
|
+
|
59
79
|
cy: # Cyprus
|
60
80
|
length: 28
|
61
|
-
|
62
|
-
|
81
|
+
regexp: >
|
82
|
+
(?<bank_identifier> \d{3})
|
83
|
+
(?<branch_identifier> \d{5})
|
84
|
+
(?<account_number> [A-Z0-9]{16})
|
63
85
|
|
64
86
|
cz: # Czech Republic
|
65
87
|
length: 24
|
66
|
-
|
67
|
-
|
68
|
-
|
88
|
+
regexp: >
|
89
|
+
(?<bank_identifier> \d{4})
|
90
|
+
(?<account_number> \d{6}\d{10})
|
91
|
+
|
69
92
|
de: # Germany
|
70
93
|
length: 22
|
71
|
-
|
72
|
-
|
73
|
-
|
94
|
+
regexp: >
|
95
|
+
(?<bank_identifier> \d{8})
|
96
|
+
(?<account_number> \d{10})
|
97
|
+
|
74
98
|
dk: # Denmark
|
75
99
|
length: 18
|
76
|
-
|
77
|
-
|
100
|
+
regexp: >
|
101
|
+
(?<bank_identifier> \d{4})
|
102
|
+
(?<account_number> \d{9})
|
103
|
+
(?<national_check_digits> \d{1})
|
78
104
|
|
79
105
|
gl: # Greenland (same as Denmark)
|
80
106
|
length: 18
|
81
|
-
|
82
|
-
|
107
|
+
regexp: >
|
108
|
+
(?<bank_identifier> \d{4})
|
109
|
+
(?<account_number> \d{9})
|
110
|
+
(?<national_check_digits> \d{1})
|
83
111
|
|
84
112
|
fo: # Faroe Islands (same as Denmark)
|
85
113
|
length: 18
|
86
|
-
|
87
|
-
|
114
|
+
regexp: >
|
115
|
+
(?<bank_identifier> \d{4})
|
116
|
+
(?<account_number> \d{9})
|
117
|
+
(?<national_check_digits> \d{1})
|
88
118
|
|
89
119
|
do: # Dominican Republic
|
90
120
|
length: 28
|
91
|
-
|
92
|
-
|
121
|
+
regexp: >
|
122
|
+
(?<bank_identifier> [A-Z]{4})
|
123
|
+
(?<account_number> \d{20})
|
93
124
|
|
94
125
|
ee: # Estonia
|
95
126
|
length: 20
|
96
|
-
|
97
|
-
|
127
|
+
regexp: >
|
128
|
+
(?<bank_identifier> \d{2})
|
129
|
+
(?<branch_identifier> \d{2})
|
130
|
+
(?<account_number> \d{11})
|
131
|
+
(?<national_check_digits> \d{1})
|
98
132
|
|
99
133
|
fi: # Finland
|
100
134
|
length: 18
|
101
|
-
|
102
|
-
|
135
|
+
regexp: >
|
136
|
+
(?<bank_identifier> \d{6})
|
137
|
+
(?<account_number> \d{7})
|
138
|
+
(?<national_check_digits> \d{1})
|
103
139
|
|
104
140
|
fr: # France
|
105
141
|
length: 27
|
106
|
-
|
107
|
-
|
142
|
+
regexp: >
|
143
|
+
(?<bank_identifier> \d{5})
|
144
|
+
(?<branch_identifier> \d{5})
|
145
|
+
(?<account_number> [A-Z0-9]{11})
|
146
|
+
(?<national_check_digits> \d{2})
|
108
147
|
|
109
148
|
ge: # Georgia
|
110
149
|
length: 22
|
111
|
-
|
112
|
-
|
150
|
+
regexp: >
|
151
|
+
(?<bank_identifier> [A-Z]{2})
|
152
|
+
(?<account_number> \d{16})
|
113
153
|
|
114
154
|
gi: # Gibraltar
|
115
155
|
length: 23
|
116
|
-
|
117
|
-
|
156
|
+
regexp: >
|
157
|
+
(?<bank_identifier> [A-Z]{4})
|
158
|
+
(?<account_number> [A-Z0-9]{15})
|
118
159
|
|
119
160
|
gr: # Greece
|
120
161
|
length: 27
|
121
|
-
|
122
|
-
|
162
|
+
regexp: >
|
163
|
+
(?<bank_identifier> \d{4})
|
164
|
+
(?<branch_identifier> \d{3})
|
165
|
+
(?<account_number> [A-Z0-9]{16})
|
123
166
|
|
124
167
|
gt: # Guatemala
|
125
168
|
length: 28
|
126
|
-
|
127
|
-
|
169
|
+
regexp: >
|
170
|
+
(?<bank_identifier> [A-Z0-9]{4})
|
171
|
+
(?<account_number> [A-Z0-9]{20})
|
128
172
|
|
129
173
|
hu: # Hungary
|
130
174
|
length: 28
|
131
|
-
|
132
|
-
|
133
|
-
|
175
|
+
regexp: >
|
176
|
+
(?<bank_identifier> \d{3})
|
177
|
+
(?<branch_identifier> \d{4})
|
178
|
+
(?<account_number> \d{1}\d{15})
|
179
|
+
(?<national_check_digits> \d{1})
|
180
|
+
|
134
181
|
is: # Iceland
|
135
182
|
length: 26
|
136
|
-
|
137
|
-
|
183
|
+
regexp: >
|
184
|
+
(?<bank_identifier> \d{4})
|
185
|
+
(?<branch_identifier> \d{2})
|
186
|
+
(?<account_number> \d{6}\d{10})
|
138
187
|
|
139
188
|
ie: # Ireland
|
140
189
|
length: 22
|
141
|
-
|
142
|
-
|
190
|
+
regexp: >
|
191
|
+
(?<bank_identifier> [A-Z0-9]{4})
|
192
|
+
(?<branch_identifier> \d{6})
|
193
|
+
(?<account_number> \d{8})
|
143
194
|
|
144
195
|
il: # Israel
|
145
196
|
length: 23
|
146
|
-
|
147
|
-
|
197
|
+
regexp: >
|
198
|
+
(?<bank_identifier> \d{3})
|
199
|
+
(?<branch_identifier> \d{3})
|
200
|
+
(?<account_number> \d{13})
|
148
201
|
|
149
202
|
it: # Italy
|
150
203
|
length: 27
|
151
|
-
|
152
|
-
|
204
|
+
regexp: >
|
205
|
+
(?<national_check_digits> [A-Z])
|
206
|
+
(?<bank_identifier> \d{5})
|
207
|
+
(?<branch_identifier> \d{5})
|
208
|
+
(?<account_number> [A-Z0-9]{12})
|
153
209
|
|
154
210
|
kz: # Kazakhstan
|
155
211
|
length: 20
|
156
|
-
|
157
|
-
|
212
|
+
regexp: >
|
213
|
+
(?<bank_identifier> \d{3})
|
214
|
+
(?<account_number> [A-Z0-9]{13})
|
158
215
|
|
159
216
|
kw: # Kuwait
|
160
217
|
length: 30
|
161
|
-
|
162
|
-
|
218
|
+
regexp: >
|
219
|
+
(?<bank_identifier> [A-Z]{4})
|
220
|
+
(?<account_number> [A-Z0-9]{22})
|
163
221
|
|
164
222
|
lv: # Latvia
|
165
223
|
length: 21
|
166
|
-
|
167
|
-
|
224
|
+
regexp: >
|
225
|
+
(?<bank_identifier> [A-Z]{4})
|
226
|
+
(?<account_number> [A-Z0-9]{13})
|
168
227
|
|
169
228
|
lb: # Lebanon
|
170
229
|
length: 28
|
171
|
-
|
172
|
-
|
230
|
+
regexp: >
|
231
|
+
(?<bank_identifier> \d{4})
|
232
|
+
(?<account_number> [A-Z0-9]{20})
|
173
233
|
|
174
234
|
li: # Liechtenstein
|
175
235
|
length: 21
|
176
|
-
|
177
|
-
|
236
|
+
regexp: >
|
237
|
+
(?<bank_identifier> \d{5})
|
238
|
+
(?<account_number> [A-Z0-9]{12})
|
178
239
|
|
179
240
|
lt: # Lithuania
|
180
241
|
length: 20
|
181
|
-
|
182
|
-
|
242
|
+
regexp: >
|
243
|
+
(?<bank_identifier> \d{5})
|
244
|
+
(?<account_number> \d{11})
|
183
245
|
|
184
246
|
lu: # Luxembourg
|
185
247
|
length: 20
|
186
|
-
|
187
|
-
|
248
|
+
regexp: >
|
249
|
+
(?<bank_identifier> \d{3})
|
250
|
+
(?<account_number> [A-Z0-9]{13})
|
188
251
|
|
189
252
|
mk: # Macedonia
|
190
253
|
length: 19
|
191
|
-
|
192
|
-
|
254
|
+
regexp: >
|
255
|
+
(?<branch_identifier> \d{3})
|
256
|
+
(?<account_number> [A-Z0-9]{10})
|
257
|
+
(?<national_check_digits> \d{2})
|
193
258
|
|
194
259
|
mt: # Malta
|
195
260
|
length: 31
|
196
|
-
|
197
|
-
|
261
|
+
regexp: >
|
262
|
+
(?<bank_identifier> [A-Z]{4})
|
263
|
+
(?<branch_identifier> \d{5})
|
264
|
+
(?<account_number> [A-Z0-9]{18})
|
198
265
|
|
199
266
|
mr: # Mauritania
|
200
267
|
length: 27
|
201
|
-
|
202
|
-
|
203
|
-
|
268
|
+
regexp: >
|
269
|
+
(?<bank_identifier> \d{5})
|
270
|
+
(?<branch_identifier> \d{5})
|
271
|
+
(?<account_number> \d{11})
|
272
|
+
(?<national_check_digits> \d{2})
|
273
|
+
|
204
274
|
mu: # Mauritius
|
205
275
|
length: 30
|
206
|
-
|
207
|
-
|
276
|
+
regexp: >
|
277
|
+
(?<bank_identifier> [A-Z]{4}\d{2})
|
278
|
+
(?<branch_identifier> \d{2})
|
279
|
+
(?<account_number> \d{12}\d{3}[A-Z]{3})
|
208
280
|
|
209
281
|
mc: # Monaco
|
210
282
|
length: 27
|
211
|
-
|
212
|
-
|
283
|
+
regexp: >
|
284
|
+
(?<bank_identifier> \d{5})
|
285
|
+
(?<branch_identifier> \d{5})
|
286
|
+
(?<account_number> [A-Z0-9]{11})
|
287
|
+
(?<national_check_digits> \d{2})
|
213
288
|
|
214
289
|
md: # Moldova
|
215
290
|
length: 24
|
216
|
-
|
217
|
-
|
291
|
+
regexp: >
|
292
|
+
(?<bank_identifier> [A-Z0-9]{2})
|
293
|
+
(?<account_number> \d{18})
|
218
294
|
|
219
295
|
me: # Montenegro
|
220
296
|
length: 22
|
221
|
-
|
222
|
-
|
223
|
-
|
297
|
+
regexp: >
|
298
|
+
(?<bank_identifier> \d{3})
|
299
|
+
(?<account_number> (\d{13})(\d{2}))
|
300
|
+
|
224
301
|
nl: # Netherlands
|
225
302
|
length: 18
|
226
|
-
|
227
|
-
|
228
|
-
|
303
|
+
regexp: >
|
304
|
+
(?<bank_identifier> [A-Z]{4})
|
305
|
+
(?<account_number> \d{10})
|
306
|
+
|
229
307
|
'no': # Norway
|
230
308
|
length: 15
|
231
|
-
|
232
|
-
|
233
|
-
|
309
|
+
regexp: >
|
310
|
+
(?<bank_identifier> \d{4})
|
311
|
+
(?<account_number> (\d{6})(\d{1}))
|
312
|
+
|
234
313
|
pk: # Pakistan
|
235
314
|
length: 24
|
236
|
-
|
237
|
-
|
238
|
-
|
315
|
+
regexp: >
|
316
|
+
(?<bank_identifier> [A-Z0-9]{4})
|
317
|
+
(?<account_number> \d{16})
|
318
|
+
|
239
319
|
ps: # Palestine
|
240
320
|
length: 29
|
241
|
-
|
242
|
-
|
243
|
-
|
321
|
+
regexp: >
|
322
|
+
(?<bank_identifier> [A-Z0-9]{4})
|
323
|
+
(?<account_number> \d{21})
|
324
|
+
|
244
325
|
pl: # Poland
|
245
326
|
length: 28
|
246
|
-
|
247
|
-
|
248
|
-
|
327
|
+
regexp: >
|
328
|
+
(?<bank_identifier> \d{8})
|
329
|
+
(?<account_number> \d{16})
|
330
|
+
|
249
331
|
pt: # Portugal
|
250
332
|
length: 25
|
251
|
-
|
252
|
-
|
253
|
-
|
333
|
+
regexp: >
|
334
|
+
(?<bank_identifier> \d{4})
|
335
|
+
(?<branch_identifier> \d{4})
|
336
|
+
(?<account_number> \d{11})
|
337
|
+
(?<national_check_digits> \d{2})
|
338
|
+
|
254
339
|
ro: # Romania
|
255
340
|
length: 24
|
256
|
-
|
257
|
-
|
341
|
+
regexp: >
|
342
|
+
(?<bank_identifier> [A-Z]{4})
|
343
|
+
(?<account_number> [A-Z0-9]{16})
|
258
344
|
|
259
345
|
sm: # San Marino
|
260
346
|
length: 27
|
261
|
-
|
262
|
-
|
347
|
+
regexp: >
|
348
|
+
(?<national_check_digits> [A-Z])
|
349
|
+
(?<bank_identifier> \d{5})
|
350
|
+
(?<branch_identifier> \d{5})
|
351
|
+
(?<account_number> [A-Z0-9]{12})
|
263
352
|
|
264
353
|
sa: # Saudi Arabia
|
265
354
|
length: 24
|
266
|
-
|
267
|
-
|
355
|
+
regexp: >
|
356
|
+
(?<bank_identifier> \d{2})
|
357
|
+
(?<account_number> [A-Z0-9]{18})
|
268
358
|
|
269
359
|
rs: # Serbia
|
270
360
|
length: 22
|
271
|
-
|
272
|
-
|
273
|
-
|
361
|
+
regexp: >
|
362
|
+
(?<bank_identifier> \d{3})
|
363
|
+
(?<account_number> \d{13})
|
364
|
+
(?<national_check_digits> \d{2})
|
365
|
+
|
274
366
|
sk: # Slovak Republic
|
275
367
|
length: 24
|
276
|
-
|
277
|
-
|
368
|
+
regexp: >
|
369
|
+
(?<bank_identifier> \d{4})
|
370
|
+
(?<branch_identifier> \d{6})
|
371
|
+
(?<account_number> \d{10})
|
278
372
|
|
279
373
|
si: # Slovenia
|
280
374
|
length: 19
|
281
|
-
|
282
|
-
|
283
|
-
|
375
|
+
regexp: >
|
376
|
+
(?<bank_identifier> \d{5})
|
377
|
+
(?<account_number> \d{8})
|
378
|
+
(?<national_check_digits> \d{2})
|
379
|
+
|
284
380
|
es: # Spain
|
285
381
|
length: 24
|
286
|
-
|
287
|
-
|
288
|
-
|
382
|
+
regexp: >
|
383
|
+
(?<bank_identifier> \d{4})
|
384
|
+
(?<branch_identifier> \d{4})
|
385
|
+
(?<national_check_digits> \d{1}\d{1})
|
386
|
+
(?<account_number> \d{10})
|
387
|
+
|
289
388
|
se: # Sweden
|
290
389
|
length: 24
|
291
|
-
|
292
|
-
|
390
|
+
regexp: >
|
391
|
+
(?<bank_identifier> \d{3})
|
392
|
+
(?<account_number> \d{16}\d{1})
|
293
393
|
|
294
394
|
ch: # Switzerland
|
295
395
|
length: 21
|
296
|
-
|
297
|
-
|
396
|
+
regexp: >
|
397
|
+
(?<bank_identifier> \d{5})
|
398
|
+
(?<account_number> [A-Z0-9]{12})
|
298
399
|
|
299
400
|
tn: # Tunisia
|
300
401
|
length: 24
|
301
|
-
|
302
|
-
|
402
|
+
regexp: >
|
403
|
+
(?<bank_identifier> \d{2})
|
404
|
+
(?<branch_identifier> \d{3})
|
405
|
+
(?<account_number> \d{13}\d{2})
|
303
406
|
|
304
407
|
tr: # Turkey
|
305
408
|
length: 26
|
306
|
-
|
307
|
-
|
308
|
-
|
409
|
+
regexp: >
|
410
|
+
(?<bank_identifier> \d{5})([A-Z0-9])
|
411
|
+
(?<account_number> [A-Z0-9]{16})
|
412
|
+
|
309
413
|
ae: # United Arab Emirates
|
310
414
|
length: 23
|
311
|
-
|
312
|
-
|
313
|
-
|
415
|
+
regexp: >
|
416
|
+
(?<bank_identifier> \d{3})
|
417
|
+
(?<account_number> \d{16})
|
418
|
+
|
314
419
|
gb: # United Kingdom
|
315
420
|
length: 22
|
316
|
-
|
317
|
-
|
318
|
-
|
421
|
+
regexp: >
|
422
|
+
(?<bank_identifier> [A-Z]{4})
|
423
|
+
(?<branch_identifier> \d{6})
|
424
|
+
(?<account_number> \d{8})
|
425
|
+
|
319
426
|
vg: # Virgin Islands, British
|
320
427
|
length: 24
|
321
|
-
|
322
|
-
|
428
|
+
regexp: >
|
429
|
+
(?<bank_identifier> [A-Z0-9]{4})
|
430
|
+
(?<account_number> \d{16})
|
323
431
|
|
324
432
|
# In addition to the above list, Nordea has catalogued IBANs for countries listed below.[32]
|
325
433
|
|
434
|
+
ua: # Ukraine
|
435
|
+
length: 29
|
436
|
+
regexp: >
|
437
|
+
(?<bank_identifier> [0-9]{6})
|
438
|
+
(?<account_number> \d{19})
|
439
|
+
|
440
|
+
|
326
441
|
ao: # Angola
|
327
442
|
length: 25
|
328
|
-
# regexp: '\d{21}'
|
329
443
|
regexp: '\d{21}'
|
330
444
|
|
331
445
|
bj: # Benin
|
332
446
|
length: 28
|
333
|
-
# regexp: '[A-Z]\d{23}'
|
334
447
|
regexp: '[A-Z]\d{23}'
|
335
448
|
|
336
449
|
bf: # Burkina Faso
|
337
450
|
length: 27
|
338
|
-
# regexp: '\d{23}'
|
339
451
|
regexp: '\d{23}'
|
340
452
|
|
341
453
|
bi: # Burundi
|
342
454
|
length: 16
|
343
|
-
# regexp: '\d{12}'
|
344
455
|
regexp: '\d{12}'
|
345
456
|
|
346
457
|
cm: # Cameroon
|
347
458
|
length: 27
|
348
|
-
# regexp: '\d{23}'
|
349
459
|
regexp: '\d{23}'
|
350
460
|
|
351
461
|
cv: # Cape Verde
|
352
462
|
length: 25
|
353
|
-
# regexp: '\d{21}'
|
354
463
|
regexp: '\d{21}'
|
355
464
|
|
356
465
|
ir: # Iran
|
357
466
|
length: 26
|
358
|
-
# regexp: '\d{22}'
|
359
467
|
regexp: '\d{22}'
|
360
468
|
|
361
469
|
ci: # Ivory Coast
|
362
470
|
length: 28
|
363
|
-
# regexp: '[A-Z]\d{23}'
|
364
471
|
regexp: '[A-Z]\d{23}'
|
365
472
|
|
366
473
|
mg: # Madagascar
|
367
474
|
length: 27
|
368
|
-
# regexp: '\d{23}'
|
369
475
|
regexp: '\d{23}'
|
370
476
|
|
371
477
|
ml: # Mali
|
372
478
|
length: 28
|
373
|
-
# regexp: '[A-Z]\d{23}'
|
374
479
|
regexp: '[A-Z]\d{23}'
|
375
480
|
|
376
481
|
mz: # Mozambique
|
377
482
|
length: 25
|
378
|
-
# regexp: '\d{21}'
|
379
483
|
regexp: '\d{21}'
|
380
484
|
|
381
485
|
sn: # Senegal
|
382
486
|
length: 28
|
383
|
-
# regexp: '[A-Z]\d{23}'
|
384
487
|
regexp: '[A-Z]\d{23}'
|
385
488
|
|
386
489
|
# not quite sure about these:
|
@@ -400,7 +503,3 @@ sn: # Senegal
|
|
400
503
|
# ga: # Gabun
|
401
504
|
# length: 27
|
402
505
|
# # regexp: ''
|
403
|
-
#
|
404
|
-
# ua: # Ukraine
|
405
|
-
# length: 29
|
406
|
-
## regexp: ''
|