| 1 | <?php |
||
| 8 | class CardCvc implements Rule |
||
| 9 | { |
||
| 10 | const MSG_CARD_CVC_INVALID = 'validation.credit_card.card_cvc_invalid'; |
||
| 11 | |||
| 12 | protected $message; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Credit card number. |
||
| 16 | * |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | protected $card_number; |
||
| 20 | |||
| 21 | 1 | public function __construct(string $card_number) |
|
| 26 | |||
| 27 | /** |
||
| 28 | * Determine if the validation rule passes. |
||
| 29 | * |
||
| 30 | * @param string $attribute |
||
| 31 | * @param mixed $value |
||
| 32 | * |
||
| 33 | * @return bool |
||
| 34 | */ |
||
| 35 | 1 | public function passes($attribute, $value) |
|
| 43 | |||
| 44 | /** |
||
| 45 | * Get the validation error message. |
||
| 46 | * |
||
| 47 | * @return string |
||
| 48 | */ |
||
| 49 | 1 | public function message() |
|
| 53 | } |
||
| 54 |