Back to Payments
MEDIUMError Handling

Invalid Card Number Validation

Verify that invalid card numbers are caught by client-side validation before submission, providing immediate feedback.

4 steps
~2 min
payment-16

Preconditions

  • You are on the checkout payment page with card option

Test Data

Invalid card: 1234 5678 9012 3456 (fails Luhn check)

Test Steps

Follow each step carefully

0/4

Navigate to checkout payment step

Verify

Card payment form is visible

Enter an invalid card number

Location

Type: 1234567890123456

Verify

Number is entered in the field

Note

This number fails the Luhn algorithm check used to validate cards

Move focus away from the card field (blur)

Location

Click on another field or tab away

Verify

Validation triggers

Observe the validation message

Verify

Error message appears indicating invalid card

Expected Result

Client-side validation: (1) Immediate feedback without server round-trip, (2) Clear error message: "Invalid card number" or similar, (3) Card field is highlighted as invalid, (4) Submit button may be disabled until valid, (5) No payment attempt is made with invalid card.

Ready to Complete?

Click when you have verified all steps and the expected result.

Test Info

Module
Payments
Steps
4
Duration
2 min
XP Value
+20