@thecb/components 10.6.6-beta.2 → 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 +15 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +15 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -40380,6 +40380,21 @@ validatorFns[VALID_NAME] = (value, args, form) =>
|
|
|
40380
40380
|
? false
|
|
40381
40381
|
: new RegExp(/[A-zÀ-ÿ\-,'\S]+(\s?[A-zÀ-ÿ\-,'\S])*/).test(value);
|
|
40382
40382
|
|
|
40383
|
+
const IS_NOT_AMEX_CARD = 'validator/IS_NOT_AMEX_CARD';
|
|
40384
|
+
const IS_NOT_AMEX_CARD_ERROR = 'validator/IS_NOT_AMEX_CARD_ERROR';
|
|
40385
|
+
const isNotAmExCard = createValidator(
|
|
40386
|
+
IS_NOT_AMEX_CARD,
|
|
40387
|
+
IS_NOT_AMEX_CARD_ERROR
|
|
40388
|
+
);
|
|
40389
|
+
/* This regular expression looks for values not starting with 34 or 37, and
|
|
40390
|
+
* reflects that the shortest credit card number we will see is 8 digits,
|
|
40391
|
+
* while the longest we'd see is 19 digits according to ansi.org. We want to
|
|
40392
|
+
* allow any number with a length in that range that is not an AmEx Card.
|
|
40393
|
+
* Source: https://www.ansi.org/standards-news/all-news/2016/07/announcing-major-changes-to-the-issuer-identification-number-iin-standard-28
|
|
40394
|
+
*/
|
|
40395
|
+
validatorFns[IS_NOT_AMEX_CARD] = (value, args, form) =>
|
|
40396
|
+
new RegExp(/^([^3]\d{7,18}|3[^47]\d{6,17})$/).test(value);
|
|
40397
|
+
|
|
40383
40398
|
const runValidatorErrorMessage = (type) =>
|
|
40384
40399
|
`${type} was passed to runValidator, but that validator type does not exist.
|
|
40385
40400
|
Please check that you are only calling validator creator functions exported from
|