razorpay / ifsc

:bank: IFSC Codes Repository
https://ifsc.razorpay.com
MIT License
338 stars 129 forks source link

Validation Issue with IFSC Dataset for Banks having branch codes that involve string #178

Closed syedsaadh closed 4 years ago

syedsaadh commented 4 years ago

There is validation issue for banks with string as branch code

Reproduction of Issue:

IDIB000A001 URBN00000B1

var ifsc = require("ifsc") // v 1.51

ifsc.fetchDetails('IDIB000C122').then(function(res) {
   console.log(res);
}).catch(e => console.log(e));

Response

Invalid IFSC Code

The IFSC dataset contains branch codes with 6 characters instead it should contain 7 characters. The Validation Code is checking 7 characters to 6 characters so for each branch code where characters are mixed the validation issue persists.

Dataset: IFSC.json

captn3m0 commented 4 years ago

Was an issue with the published version of the package having an out-of-date code.

I've pushed 1.5.1-1 with the fix, and added this specific IFSC to the tests.