Archive for March, 2006

Credit Card Validation with JavaScript and Regular Expressions

Monday, March 20th, 2006

Continuing from the last post, for the javascript I checked the credit card number of form submittal, (along with a lot other things, like required fields, correct phone numbers, etc… ) and if it isn’t correct, throw an alert and prevent the form from submitting (Ignore the PHP tags, haven’t gotten around to adding a […]

Credit Card Validation In PHP With Regular Expressions

Friday, March 17th, 2006

I had to do some credit card validation in both JavaScript and PHP recently. Looking around the net, I found some decent information but no scripts that fit the business rules I was given. There are a lot of different ways to approach validating a credit card. You can go with the loose rule of […]