diff --git a/lib/lambda/c3-validate-entry/card/validation.js b/lib/lambda/c3-validate-entry/card/validation.js index 63acb4dd..886947be 100644 --- a/lib/lambda/c3-validate-entry/card/validation.js +++ b/lib/lambda/c3-validate-entry/card/validation.js @@ -32,6 +32,9 @@ export function validateCardNumber(cardNumber) { const discover = new Discover(cardNumber); return discover.validate(); default: + if (cardNumber.length < 13 || cardNumber.length > 19) { + return 'The card number must be between 13 and 19 digits long.'; + } return null; // Unknown card network; assume it's valid. } }