Credit Card Validation on Zurb Foundation with Abide -
i trying build quick prototype zurb foundation. working great. did have 1 question trying figure out , their documentation has not helped me.
when validating field credit card. want leverage ability detect card type , display corresponding card image in postfix. advice on how or should scrap prototype? mind doesn't have useable on live web app. need fake testing.
thanks in advance help!
you not need run entire credit card number server-side detect type of card. visa card numbers start 4, mastercard starts 51-55, , amex starts 34 or 37.
you can use regex , javascript detect card type.
see related stack overflow question contains regular expressions different types of cards: how detect credit card type based on number?
Comments
Post a Comment