use Phalcon\Validation\Validator\CardNumber as CreditCardValidator;
$validator->add('creditcard', new CreditCardValidator([
'message' => 'The credit card number is not valid',
'type' => CardNumber::VISA, // Any if not specified
]));
Show file
Open project: phalcon/incubator
Method | Description | |
---|---|---|
validate ( Phalcon\Validation $validation, string $attribute ) : boolean |