The cardvalidate( function verifies that a number is a valid credit card number.
Parameters
This function has one parameter:cardnumber – the credit card number to check. This number can contain spaces or punctuation, which will be ignored.
Description
This function verifies that a number is a valid credit card number. Credit cards have an internal checksum that allows a number to be validated for simple data entry errors (for example missing or transposed digits). This function checks to make sure that a number is a valid credit card number.
cardvalidate("4123-9876-4529") ☞ TRUE
cardvalidate("4123-9876-4527") ☞ FALSE
Of course the function cannot tell whether this card number has actually been issued, or what the credit limit is or any other financial information about the card. It simply provides a basic check for missing or transposed digits. (Basically, if this function says that the number is in error you know for sure that the number is wrong, but if this function says the number is valid you would still need to check with the issuer to determine if this is a valid card.)
See Also
History
Version | Status | Notes |
10.0 | No Change | Carried over from Panorama 6.0 |