1 | <?php |
||
7 | class CardExpirationYear implements Rule |
||
8 | { |
||
9 | const MSG_CARD_EXPIRATION_YEAR_INVALID = 'validation.credit_card.card_expiation_year_invalid'; |
||
10 | |||
11 | /** |
||
12 | * Month field name. |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $month; |
||
17 | |||
18 | /** |
||
19 | * CardExpirationYear constructor. |
||
20 | * |
||
21 | * @param string $month |
||
22 | */ |
||
23 | 1 | public function __construct(string $month) |
|
27 | |||
28 | /** |
||
29 | * Determine if the validation rule passes. |
||
30 | * |
||
31 | * @param string $attribute |
||
32 | * @param mixed $value |
||
33 | * |
||
34 | * @return bool |
||
35 | */ |
||
36 | 1 | public function passes($attribute, $value) |
|
45 | |||
46 | /** |
||
47 | * Get the validation error message. |
||
48 | * |
||
49 | * @return string |
||
50 | */ |
||
51 | 1 | public function message() |
|
55 | } |
||
56 |