inacho / php-credit-card-validator

Validates popular debit and credit cards numbers against regular expressions and Luhn algorithm. Also validates the CVC and the expiration date.
MIT License
199 stars 104 forks source link

Use is_numeric instead of ctype_digit to validate numeric type #5

Open humancopy opened 8 years ago

humancopy commented 8 years ago

Using ctype_digit doesn't work as expected. For example for the CVC of 243 which is valid it returns false. Using is_numeric is more appropriate in this case.