Validating a credit card
We are not sure that all the formats which we have discussed here are correct because time to time a company can change their numbering format.You can easily change a format with simply modify the regular expression which we have used for various cards.
Only server-side processing can possibly validate a card number.Here are some format of some well-known credit cards.We all know that Java Script shouldn't be a web form's only method of validation but client side validation does prevent unnecessary server side processing when user input is obviously invalid.This is the point in the process where a card may be rejected for insufficient remaining credit.Credit card companies will also decline expired cards or cards that represent closed accounts.
Search for validating a credit card:
(ISBN: 1904151051) by Paul Wilton, Stephen Williams, and Sing Li.