Platforms to show: All Mac Windows Linux Cross-Platform

IsValidCreditCardNumberMBS(Number as String) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
global method Math MBS Util Plugin 11.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Verifies a credit card number.
Example
MsgBox "test 49927398716 gives "+str(IsValidCreditCardNumberMBS("49927398716"))+EndOfLine+_
"test 49927398717 gives "+str(IsValidCreditCardNumberMBS("49927398717"))

This function implements the Luhn algorithm. This is a simple checksum formula used to validate a variety of identification numbers, such as credit card numbers, IMEI numbers, National Provider Identifier numbers in US and Canadian Social Insurance Numbers.
Returns true on success or false on failure.

If this function returns false, you can be sure the number is not valid. But if the function returns true, you may want to check the number online with some database.

Blog Entries

The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...