Monthly Archives: June 2012

luhn – simple credit card validation for JavaScript and Node.js

If you’ve worked on websites for any amount of time, there is a decent chance that you’ve encountered the need to validate credit card numbers at some point.  While there are a lot of compliance and security guidelines for working with credit card numbers, these don’t reduce the need for ensuring the user entered a valid credit card number into the form.  Some places will validate just length and ensure only numeric digits were provided; however, did you know there’s an algorithm that most credit cards are based on?

Continue reading luhn – simple credit card validation for JavaScript and Node.js

Advertisements