| 1 | <?php |
||
| 7 | class CardExpirationYear implements Rule |
||
| 8 | { |
||
| 9 | const MSG_CARD_EXPIRATION_YEAR_INVALID = 'validation.credit_card.card_expiration_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 | 2 | public function __construct($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 | 2 | public function passes($attribute, $value) |
|
| 41 | |||
| 42 | /** |
||
| 43 | * Get the validation error message. |
||
| 44 | * |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | 1 | public function message() |
|
| 51 | } |
||
| 52 |