Luhn's Algorithm for Form Validation | Community
Skip to main content
October 16, 2015
Solved

Luhn's Algorithm for Form Validation

  • October 16, 2015
  • 1 reply
  • 731 views

Has anybody figure out how to use the Luhn's Algorithm for the Form Component? If you add a form element, like TextField, you can select a validation as part of the Constraint tab. In that tab, there is an option for Luhn's algorithm to validate credit cards and some government IDs. 

However, whenever the drop down field for the constraint is selected, nothing else happens.

I looked at the documentation but there is no reference to this feature.

Any comment/suggestion is welcomed.

Mario

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

Why don't you develop your own form component and then add this logic  to it. You can use other JavaScript frameworks too. For example - with AEM -- you can use JQuery APIs and various plugins to work with credit card validation. For example:

http://jquerycreditcardvalidator.com/

1 reply

smacdonald2008
smacdonald2008Accepted solution
Level 10
October 16, 2015

Why don't you develop your own form component and then add this logic  to it. You can use other JavaScript frameworks too. For example - with AEM -- you can use JQuery APIs and various plugins to work with credit card validation. For example:

http://jquerycreditcardvalidator.com/