CC# Form Field Validation
Moderator: General Moderators
CC# Form Field Validation
I'm looking to validate there are 16 (or whatever) digits entered by the client into a form field (credit card). I'm not looking to verify the customer's account (there's PayPal for that). If it's not too fancy, maybe check to see if the beginning digit is correct for the appropriate credit card too. Any help is much appreciated.
You want to use the luhn algo.
You can see more information here:
http://www.zend.com/codex.php?id=31&single=1
You can see more information here:
http://www.zend.com/codex.php?id=31&single=1