-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(isBIC): add XK
to accepted BIC country codes
#2046
Conversation
Codecov ReportBase: 100.00% // Head: 100.00% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #2046 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 105 105
Lines 2334 2335 +1
Branches 586 586
=========================================
+ Hits 2334 2335 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe extract the country code to its own variable instead of resolving it twice?
Would it be better to add the country code to the Set of country codes in isISO21661Alpha2.js? |
No, it's not part of that list. It's a special code used only for BIC (in the scope of this project) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add some tests for the XK
BIC? Preferably some valid and invalid.
You can add them to the current test;
validator.js/test/validators.test.js
Lines 5070 to 5088 in 753c29d
it('should validate BIC codes', () => { | |
test({ | |
validator: 'isBIC', | |
valid: [ | |
'SBICKEN1345', | |
'SBICKEN1', | |
'SBICKENY', | |
'SBICKEN1YYP', | |
], | |
invalid: [ | |
'SBIC23NXXX', | |
'S23CKENXXXX', | |
'SBICKENXX', | |
'SBICKENXX9', | |
'SBICKEN13458', | |
'SBICKEN', | |
], | |
}); | |
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for your contrib 🎉
Adds the country code
XK
(Republic of Kosovo) toisBIC
's allowed country codescloses #2045
Checklist