1 | <?php |
||
5 | class Max extends Rule |
||
6 | { |
||
7 | /** |
||
8 | * @var int |
||
9 | */ |
||
10 | protected $max; |
||
11 | |||
12 | /** |
||
13 | * Max constructor. |
||
14 | * |
||
15 | * @param $max |
||
16 | */ |
||
17 | public function __construct($max) |
||
21 | |||
22 | /** |
||
23 | * @param $field |
||
24 | * @param $value |
||
25 | * |
||
26 | * @param $data |
||
27 | * |
||
28 | * @return bool |
||
29 | */ |
||
30 | public function passes($field, $value, $data): bool |
||
34 | |||
35 | /** |
||
36 | * @param $field |
||
37 | * |
||
38 | * @return string |
||
39 | */ |
||
40 | public function message($field): string |
||
44 | } |
||
45 |