@thecb/components 4.2.3 → 4.2.4
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
CHANGED
|
@@ -6112,7 +6112,7 @@ var displayCardBrand = function displayCardBrand(number) {
|
|
|
6112
6112
|
} else if (/^4/.test(number)) {
|
|
6113
6113
|
return "Visa";
|
|
6114
6114
|
} else if (/^3[4,7]/.test(number)) {
|
|
6115
|
-
return "
|
|
6115
|
+
return "American Express";
|
|
6116
6116
|
} else return "Unknown Card";
|
|
6117
6117
|
};
|
|
6118
6118
|
var checkRestrictedCards = function checkRestrictedCards(name) {
|
|
@@ -39437,7 +39437,7 @@ var PaymentFormCard = function PaymentFormCard(_ref) {
|
|
|
39437
39437
|
|
|
39438
39438
|
var nameOnCardErrors = _defineProperty({}, required.error, "Name is required");
|
|
39439
39439
|
|
|
39440
|
-
var creditCardNumberErrors = (_creditCardNumberErro = {}, _defineProperty(_creditCardNumberErro, required.error, "Credit card number is required"), _defineProperty(_creditCardNumberErro, hasLength.error, "Credit card number is invalid"), _defineProperty(_creditCardNumberErro, matchesRegex.error, "".concat(displayCardBrand(fields.creditCardNumber.rawValue), "
|
|
39440
|
+
var creditCardNumberErrors = (_creditCardNumberErro = {}, _defineProperty(_creditCardNumberErro, required.error, "Credit card number is required"), _defineProperty(_creditCardNumberErro, hasLength.error, "Credit card number is invalid"), _defineProperty(_creditCardNumberErro, matchesRegex.error, "".concat(displayCardBrand(fields.creditCardNumber.rawValue), " is not accepted")), _creditCardNumberErro);
|
|
39441
39441
|
var expirationDateErrors = (_expirationDateErrors = {}, _defineProperty(_expirationDateErrors, required.error, "Expiration date is required"), _defineProperty(_expirationDateErrors, hasLength.error, "Expiration date is invalid"), _defineProperty(_expirationDateErrors, matchesRegex.error, "Expiration date is invalid"), _expirationDateErrors);
|
|
39442
39442
|
var cvvErrors = (_cvvErrors = {}, _defineProperty(_cvvErrors, required.error, "CVV is required"), _defineProperty(_cvvErrors, hasLength.error, "CVV is invalid"), _cvvErrors);
|
|
39443
39443
|
var zipCodeErrors = (_zipCodeErrors = {}, _defineProperty(_zipCodeErrors, required.error, "Zip code is required"), _defineProperty(_zipCodeErrors, hasLength.error, "Zip code is invalid"), _zipCodeErrors);
|
package/package.json
CHANGED
|
@@ -59,7 +59,7 @@ const PaymentFormCard = ({
|
|
|
59
59
|
[hasLength.error]: "Credit card number is invalid",
|
|
60
60
|
[matchesRegex.error]: `${displayCardBrand(
|
|
61
61
|
fields.creditCardNumber.rawValue
|
|
62
|
-
)}
|
|
62
|
+
)} is not accepted`
|
|
63
63
|
};
|
|
64
64
|
const expirationDateErrors = {
|
|
65
65
|
[required.error]: "Expiration date is required",
|
package/src/util/general.js
CHANGED