arhs / iban.js

IBAN & BBAN validation, formatting and conversion in Javascript
https://arhs.github.io/iban.js/
MIT License
535 stars 130 forks source link

Add support for Partial IBAN Countries #68

Open yaxirpaxha opened 5 years ago

yaxirpaxha commented 5 years ago

Hi..! Library currently supports national IBAN formats of those countries that are compliant with the ISO 13616 standard (Published by SWIFT). But there are some partial IBAN countries (many banks work with them) needs to be added in lib.

For reference please see --> https://www.iban.com/structure.html

LaurentVB commented 5 years ago

Hey there, thanks for your message We already support a lot of those (see here: https://github.com/arhs/iban.js/blob/master/iban.js#L298-L323) Can you provide a list of the missing ones you'd like to see implemented? Thanks

yaxirpaxha commented 5 years ago

yes sure, following is the list of missing countries

// Jordan
addSpecification(new Specification("JO", 30, "A04F22", "JO15AAAA1234567890123456789012"));
// Quatar
addSpecification(new Specification("QA", 29, "U04A21", "QA30AAAA123456789012345678901"));
// Ukraine
addSpecification(new Specification("UA", 29, "F25","UA511234567890123456789012345"));
// Central African Republic
addSpecification(new Specification("CF", 27, "F23","CF4220001000010120069700160"));
// Comoros
addSpecification(new Specification("KM", 27, "F23","KM4600005000010010904400137"));
// Djibouti
addSpecification(new Specification("DJ", 27, "F23","DJ2110002010010409943020008"));
// Equatorial Guinea
addSpecification(new Specification("GQ", 27, "F23","GQ7050002001003715228190196"));
// Guinea-Bissau
addSpecification(new Specification("GW", 25, "U02F19","GW04GW1430010181800637601"));
// Honduras
addSpecification(new Specification("HN", 28, "U04A20","HN54PISA00000000000000123124"));
// Morocco
addSpecification(new Specification("MA", 28, "F24","MA64011519000001205000534921"));
// Nicaragua
addSpecification(new Specification("NI", 32, "U04A24","NI92BAMC000000000000000003123123"));
// Niger
addSpecification(new Specification("NE", 28, "U02F22","NE58NE0380100100130305000268"));
// Togo
addSpecification(new Specification("TG", 28, "U02F22","TG53TG0090604310346500400070"));
// Chad
addSpecification(new Specification("TD", 27, "F23","TD8960002000010271091600153"));
// Congo
addSpecification(new Specification("CG", 27, "F23","CG3930011000101013451300019"));
// Egypt 
addSpecification(new Specification("EG", 27, "F23","EG2100037000671002392189379"));
// Gabon 
addSpecification(new Specification("GA", 27, "F23","GA2140021010032001890020126"));

In addition to this please review the following update

// Burkina
addSpecification(new Specification("BF", 28, "U02F22","BF42BF0840101300463574000390"));  
// Algeria
addSpecification(new Specification("DZ", 26, "F22","DZ580002100001113000000570"));
yaxirpaxha commented 5 years ago

One more thing ICO "Ivory" IBAN Specification in "demo\bower_components\iban\iban.js" line 296 needs to be updated addSpecification(new Specification("CI", 28, "U02F22", "CI70CI1234567890123456789012"));

It was updated in src but in demo it still showing old Value.

westor21 commented 4 years ago

This issue is still open - is this lib not maintained anymore?

westor21 commented 4 years ago

@LaurentVB : Can we expect to have the missing countries, proposed by @yaxirpaxha , in near future in your library?

LaurentVB commented 4 years ago

Hey there. Easiest way to have it included in a release soon would be to submit a PR with the missing specification objects.

Cyrille37 commented 4 years ago

Hello, See also PR #80 for more countries. Cheers.

dantman commented 3 years ago

A PR exists as requested, so I guess this means the lib isn't maintained anymore?

itoche commented 3 years ago

Hi, We have been a little bit inactive on the maintenance of this lib. Sorry for this. We will take care of it quite soon.