Skip to content

Validate Credit card numbers with a process called the Luhn algorithm.

Notifications You must be signed in to change notification settings

fiddle-leaf/luhn-form

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Luhn Algorithm

Create a function validCard to validate a Credit Card number with the Luhn Alogrithm implemented in React.js

  1. Take the last to second digit in a series (credit card number)
  2. Double the digit and every other digit until reaching the end (or the beginning of the sequence)
  3. Add all digits in modified number
  4. If total is divisible by 10, it is valid otherwise it is invalid

Languages & Tools

  • JSX, Sass
  • React.js

About

Validate Credit card numbers with a process called the Luhn algorithm.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published