@thecb/components 10.6.6-beta.1 → 10.6.6-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +16 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +16 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/util/general.js +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -6298,7 +6298,7 @@ var displayCardBrand = function displayCardBrand(number) {
|
|
|
6298
6298
|
return "Visa";
|
|
6299
6299
|
} else if (/^3[4,7]\d{13}$/.test(number)) {
|
|
6300
6300
|
return "American Express";
|
|
6301
|
-
} else return "Unknown
|
|
6301
|
+
} else return "Unknown";
|
|
6302
6302
|
};
|
|
6303
6303
|
var checkDeniedCards = function checkDeniedCards(name) {
|
|
6304
6304
|
switch (name) {
|
|
@@ -40372,6 +40372,21 @@ validatorFns[VALID_NAME] = (value, args, form) =>
|
|
|
40372
40372
|
? false
|
|
40373
40373
|
: new RegExp(/[A-zÀ-ÿ\-,'\S]+(\s?[A-zÀ-ÿ\-,'\S])*/).test(value);
|
|
40374
40374
|
|
|
40375
|
+
const IS_NOT_AMEX_CARD = 'validator/IS_NOT_AMEX_CARD';
|
|
40376
|
+
const IS_NOT_AMEX_CARD_ERROR = 'validator/IS_NOT_AMEX_CARD_ERROR';
|
|
40377
|
+
const isNotAmExCard = createValidator(
|
|
40378
|
+
IS_NOT_AMEX_CARD,
|
|
40379
|
+
IS_NOT_AMEX_CARD_ERROR
|
|
40380
|
+
);
|
|
40381
|
+
/* This regular expression looks for values not starting with 34 or 37, and
|
|
40382
|
+
* reflects that the shortest credit card number we will see is 8 digits,
|
|
40383
|
+
* while the longest we'd see is 19 digits according to ansi.org. We want to
|
|
40384
|
+
* allow any number with a length in that range that is not an AmEx Card.
|
|
40385
|
+
* Source: https://www.ansi.org/standards-news/all-news/2016/07/announcing-major-changes-to-the-issuer-identification-number-iin-standard-28
|
|
40386
|
+
*/
|
|
40387
|
+
validatorFns[IS_NOT_AMEX_CARD] = (value, args, form) =>
|
|
40388
|
+
new RegExp(/^([^3]\d{7,18}|3[^47]\d{6,17})$/).test(value);
|
|
40389
|
+
|
|
40375
40390
|
const runValidatorErrorMessage = (type) =>
|
|
40376
40391
|
`${type} was passed to runValidator, but that validator type does not exist.
|
|
40377
40392
|
Please check that you are only calling validator creator functions exported from
|