Custom AngularJS directive for Luhn validation
The Luhn algorithm is a simple checksum formula that can be used to validate credit card and other numbers. I thought it would be good to write a custom AngularJS directive to validate text inputs using the Luhn algorithm. I am new to AngularJS, so this was a good exercise in understanding how to implement custom directives.
Here is my Plunk (click the Code tab to view the source):
As I said, I am new to AngularJS, so feedback and sussgestions are welcome!