Brian Dunning's FileMaker Custom Functions

Luhn ( number )

The Luhn Mod-10 algorithm used to validate credit card numbers

  Average rating: 3.8 (43 votes) Log in to vote

Geoff Wells   Geoff Wells
DataIsland Software LLC

Share on Facebook Share on Twitter

  Sample input:
Luhn ( 123456782 )
  Sample output:
// This is a valid Mod 10 number

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

The Luhn Mod-10 algorithm is used to validate ( check for input errors ) of many credit cards and Canadian Social Security numbers.



Chris   Chris, NY
Jul 15, 2009
This function is perfect. Thank you for your good comments.
Dave C.   Dave C., Vancouver, Canada
May 1, 2015
Works great (once I realized I needed to put in 'number' as a parameter for Luhn, 'doubleEven' for LuhnProduct; and 'makeEven' for LuhnDoubleEven).

Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.