| Fully Qualified Name: | CodeIgniter\Validation\CreditCardRules |
Class CreditCardRules
Provides validation methods for common credit-card inputs.
| Name | Description | Defined By |
|---|---|---|
| valid_cc_number() | Verifies that a credit card number is valid and matches the known formats for a wide number of credit card types. This does not verify that the card is a valid card, only that the number is formatted correctly. | CreditCardRules |
Verifies that a credit card number is valid and matches the known formats for a wide number of credit card types. This does not verify that the card is a valid card, only that the number is formatted correctly.
Example: $rules = [
'cc_num' => 'valid_cc_number[visa]'
];
| Parameter Name | Type | Description |
|---|---|---|
| $ccNumber | string | |
| $type | string |
Returns: bool