Skip to content

Commit be43ebb

Browse files
dabiancoSimplify
authored andcommitted
Fixed specs for Slovenian IBAN
1 parent bf5d452 commit be43ebb

File tree

5 files changed

+37
-6
lines changed

5 files changed

+37
-6
lines changed

ChangeLog

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2023-11-13 Davide Bianco <[email protected]>
2+
* Fixed specs for Slovenian IBAN
3+
14
2023-10-14 Saša Jovanić <[email protected]>
25
* Version 4.3.5
36
* Added script to parse IBAN specification provided as text file

dist/ibantools.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1565,8 +1565,9 @@ define(["require", "exports"], function (require, exports) {
15651565
bban_validation_func: checkMod9710BBAN,
15661566
IBANRegistry: true,
15671567
SEPA: true,
1568-
bank_identifier: '-1-4',
1569-
account_indentifier: '4-19',
1568+
branch_indentifier: '2-4',
1569+
bank_identifier: '0-1',
1570+
account_indentifier: '9-16',
15701571
},
15711572
SJ: {},
15721573
SK: {

script/iban_spec.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -598,8 +598,9 @@ export const autogeneratedCountrySpecs = {
598598
bban_regexp: '^[0-9]{5}[0-9]{8}[0-9]{2}$',
599599
IBANRegistry: true,
600600
SEPA: true,
601-
bank_identifier: '-1-4',
602-
account_indentifier: '4-19',
601+
branch_indentifier: '2-4',
602+
bank_identifier: '0-1',
603+
account_indentifier: '9-16',
603604
},
604605
SK: {
605606
chars: 24,

src/ibantools.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1683,8 +1683,9 @@ export const countrySpecs: CountryMapInternal = {
16831683
bban_validation_func: checkMod9710BBAN,
16841684
IBANRegistry: true,
16851685
SEPA: true,
1686-
bank_identifier: '-1-4',
1687-
account_indentifier: '4-19',
1686+
branch_indentifier: '2-4',
1687+
bank_identifier: '0-1',
1688+
account_indentifier: '9-16',
16881689
},
16891690
SJ: {},
16901691
SK: {

test/ibantools_test.js

+25
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,31 @@ describe('IBANTools', function() {
690690
});
691691
});
692692

693+
describe('When calling extractIBAN() with valid Slovenian IBAN', function() {
694+
var ext = iban.extractIBAN('SI56263300012039086');
695+
it('valid should be true', function() {
696+
expect(ext.valid).to.be.true;
697+
});
698+
it('IBAN should be SI56263300012039086', function() {
699+
expect(ext.iban).to.equal('SI56263300012039086');
700+
});
701+
it('BBAN should be 263300012039086', function() {
702+
expect(ext.bban).to.equal('263300012039086');
703+
});
704+
it('countryCode should be SI', function() {
705+
expect(ext.countryCode).to.equal('SI');
706+
});
707+
it('accountNumber should be 00120390', function() {
708+
expect(ext.accountNumber).to.equal('00120390');
709+
});
710+
it('bankIdentifier should be 26', function() {
711+
expect(ext.bankIdentifier).to.equal('26');
712+
});
713+
it('branchIdentifier should be 330', function() {
714+
expect(ext.branchIdentifier).to.equal('330');
715+
});
716+
});
717+
693718
describe('When calling extractIBAN() with invalid IBAN', function() {
694719
var ext = iban.extractIBAN('BR970036030510009795493P1');
695720
it('valid should be false', function() {

0 commit comments

Comments
 (0)