Luhn10.isValid ( _number ; _requiredLength )
Validates Credit Card numbers, SIREN, Canadian Social Security numbers…
Average rating: 5.0 (1 vote) Log in to vote
Fabrice Nordmann - Show more from this author
1-more-thing https://www.1-more-thing.com |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
/*
Luhn10.isValid ( _number ; _requiredLength )
by Fabrice Nordmann, 1-more-thing
Jan 2023
parameters:
_number: the number to check
_requiredLength: optional: allows to check the length of the number (digits only).
For example pass 16 for a Credit card number, or 9 for a SIREN ID.
result: Boolean (True for Valid)
input examples (valid numbers)
- Credit card numbers:
- 5555 5555 5555 4444 (MasterCard)
- 5185 5408 1000 0019 (MasterCard)
- 4012 8888 8888 1881 (Visa)
- 4111 1111 1111 1111 (Visa)
- 3714 496353 98431 (AMEX)
- 3782 822463 10005 (AMEX)
- SIREN Company ID (France)
- 813730132
- 892185877
- 794430686
- Canadian social security
- many more…
*/
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.