1 | <?php |
||
14 | class CheckMaxLength implements ValidatorInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var string|null |
||
18 | */ |
||
19 | private $error; |
||
20 | |||
21 | /** |
||
22 | * @var int |
||
23 | */ |
||
24 | private $max; |
||
25 | |||
26 | /** |
||
27 | * @param int $max max. length |
||
28 | * @param string|null $error optional custom error message |
||
29 | */ |
||
30 | 8 | public function __construct($max, $error = null) |
|
35 | |||
36 | 1 | public function validate(FieldInterface $field, InputModel $model, InputValidation $validation) |
|
53 | } |
||
54 |