Comparing version 4.2.1 to 4.2.2
@@ -41,3 +41,3 @@ /*! | ||
* // returns {errorCodes: [], valid: true} | ||
* ibantools.validateIBAN("NL91 ABNA 0417 1643 00"); | ||
* ibantools.validateIBAN("NL91ABNA0417164300"); | ||
* ``` | ||
@@ -44,0 +44,0 @@ */ |
@@ -11,3 +11,3 @@ /*! | ||
* @module ibantools | ||
* @version 4.2.1 | ||
* @version 4.2.2 | ||
* @license MPL-2.0 | ||
@@ -60,3 +60,3 @@ * @preferred | ||
* // returns {errorCodes: [], valid: true} | ||
* ibantools.validateIBAN("NL91 ABNA 0417 1643 00"); | ||
* ibantools.validateIBAN("NL91ABNA0417164300"); | ||
* ``` | ||
@@ -90,3 +90,3 @@ */ | ||
} | ||
if (!isValidIBANChecksum(iban)) { | ||
if (result.errorCodes.indexOf(ValidationErrorsIBAN.WrongBBANFormat) !== -1 || !isValidIBANChecksum(iban)) { | ||
result.valid = false; | ||
@@ -93,0 +93,0 @@ result.errorCodes.push(ValidationErrorsIBAN.WrongIBANChecksum); |
@@ -11,3 +11,3 @@ /*! | ||
* @module ibantools | ||
* @version 4.2.1 | ||
* @version 4.2.2 | ||
* @license MPL-2.0 | ||
@@ -57,3 +57,3 @@ * @preferred | ||
* // returns {errorCodes: [], valid: true} | ||
* ibantools.validateIBAN("NL91 ABNA 0417 1643 00"); | ||
* ibantools.validateIBAN("NL91ABNA0417164300"); | ||
* ``` | ||
@@ -87,3 +87,3 @@ */ | ||
} | ||
if (!isValidIBANChecksum(iban)) { | ||
if (result.errorCodes.indexOf(ValidationErrorsIBAN.WrongBBANFormat) !== -1 || !isValidIBANChecksum(iban)) { | ||
result.valid = false; | ||
@@ -90,0 +90,0 @@ result.errorCodes.push(ValidationErrorsIBAN.WrongIBANChecksum); |
{ | ||
"name": "ibantools", | ||
"version": "4.2.1", | ||
"version": "4.2.2", | ||
"description": "Validation, extraction and creation of IBAN, BBAN, BIC/SWIFT numbers plus some other helpful stuff like ISO 3136-1 alpha 2 country list", | ||
@@ -57,3 +57,3 @@ "keywords": [ | ||
"coveralls": "^3.1.1", | ||
"docdash": "^1.2.0", | ||
"docdash": "^2.0.0", | ||
"eslint": "^8.0.0", | ||
@@ -60,0 +60,0 @@ "eslint-config-prettier": "^8.3.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
108522