File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ export default function isBIC(str) {
99
1010 // toUpperCase() should be removed when a new major version goes out that changes
1111 // the regex to [A-Z] (per the spec).
12- if ( ! CountryCodes . has ( str . slice ( 4 , 6 ) . toUpperCase ( ) ) ) {
12+ const countryCode = str . slice ( 4 , 6 ) . toUpperCase ( ) ;
13+
14+ if ( ! CountryCodes . has ( countryCode ) && countryCode !== 'XK' ) {
1315 return false ;
1416 }
1517
Original file line number Diff line number Diff line change @@ -5183,6 +5183,7 @@ describe('Validators', () => {
51835183 'SBICKEN1' ,
51845184 'SBICKENY' ,
51855185 'SBICKEN1YYP' ,
5186+ 'SBICXKN1YYP' ,
51865187 ] ,
51875188 invalid : [
51885189 'SBIC23NXXX' ,
@@ -5191,6 +5192,7 @@ describe('Validators', () => {
51915192 'SBICKENXX9' ,
51925193 'SBICKEN13458' ,
51935194 'SBICKEN' ,
5195+ 'SBICXK' ,
51945196 ] ,
51955197 } ) ;
51965198 } ) ;
You can’t perform that action at this time.
0 commit comments