Inline validation
- Show a checkmark after each correct input.
- When the user makes an error, such as entering a wrong credit card number, show the error message right next to or below the field it relates to.
Preserve data
Preserve the form field data entered on validation errors
Side note
Credit card numbers can be validated using the Luhn algorithm, which finds out whether the card number sequence has been correctly typed. It does not validate whether the number is valid and has sufficient funds.