1 | <?php |
||
9 | class MaxLengthValidator extends AbstractValidator |
||
10 | { |
||
11 | /** @var int */ |
||
12 | private $maxLength; |
||
13 | public function getMaxLength() { return $this->maxLength; } |
||
15 | |||
16 | /** |
||
17 | * MaxLengthValidator constructor. |
||
18 | * @param int $maxLength |
||
19 | * @param string $errorMessage |
||
20 | */ |
||
21 | public function __construct(int $maxLength, $errorMessage = "") |
||
26 | |||
27 | /** |
||
28 | * @param mixed $value |
||
29 | * @param $contextObject |
||
30 | * |
||
31 | * @throws ValidationException |
||
32 | */ |
||
33 | public function validate($value, $contextObject = null) |
||
39 | } |
||
40 |