It is also used to validate a variety of identification numbers, such as credit card numbers, National Provider Identifier numbers in the US etc. Which means you can use the same app to validate variety of things those using "mod 10" .

How it works ?

Take the digit from the rightmost and double the value of every other digit.

If the result of this doubling operation is greater than 9 (e.g., 8 × 2 = 16), then add the digits of the product (e.g., 16: 1 + 6 = 7, 18: 1 + 8 = 9) or alternatively subtract 9 from the product (e.g., 16: 16 - 9 = 7, 18: 18 - 9 = 9) or in simple wordsif the result in a two digits number, add up the digits to get a single digit number. This will results in eight single digit numbers.

Take the sum of all the digits.

if the sum is divided by 10 then its valid else its not.

so enough theory lets jump into coding.
below is the code implemented with mod 10.