You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
A clear and concise description of what the bug is.
The isBIC validator uses the list of country codes in './isISO31661Alpha2' and that list of country codes does not include "XK" (Republic of Kosovo).
However, on the ISO 9362 page, Wikipedia says that the country code in a SWIFT/BIC code is "a ISO 3166-1 alpha-2 country code (exceptionally, SWIFT has assigned the code XK to Republic of Kosovo, which does not have an ISO 3166-1 country code)".
Kosovo's code is not in the ISO 3166-1 alpha-2, but for assigning BIC country codes, it is a valid code.
Because isBIC only uses the list of country codes on the ISO 3166-1 alpha-2 format, a BIC code with "XK" as the country code would not pass.
Describe the bug
A clear and concise description of what the bug is.
The
isBIC
validator uses the list of country codes in './isISO31661Alpha2' and that list of country codes does not include"XK"
(Republic of Kosovo).However, on the ISO 9362 page, Wikipedia says that the country code in a SWIFT/BIC code is "a ISO 3166-1 alpha-2 country code (exceptionally, SWIFT has assigned the code XK to Republic of Kosovo, which does not have an ISO 3166-1 country code)".
Kosovo's code is not in the ISO 3166-1 alpha-2, but for assigning BIC country codes, it is a valid code.
Because
isBIC
only uses the list of country codes on the ISO 3166-1 alpha-2 format, a BIC code with"XK"
as the country code would not pass.validator.js/src/lib/isBIC.js
Lines 12 to 14 in 86a07ba
We should change the check above in
isBIC.js
to this to account for"XK"
being an allowed country code:Examples
If applicable, add screenshots to help explain your problem.
Additional context
Validator.js version: 13.7.0
Node.js version: 16
OS platform: [windows, linux, macOS, etc]: Linux
The text was updated successfully, but these errors were encountered: