1 | <?php |
||
6 | class RegexValidator extends AbstractValidator |
||
7 | { |
||
8 | /** |
||
9 | * @var string |
||
10 | */ |
||
11 | private $pattern; |
||
12 | |||
13 | /** |
||
14 | * RegexValidator constructor. |
||
15 | * @param string $pattern |
||
16 | * @param string $errorMessage |
||
17 | */ |
||
18 | public function __construct(string $pattern, $errorMessage = "") |
||
23 | |||
24 | /** |
||
25 | * @param mixed $value |
||
26 | * @param $contextObject |
||
27 | * |
||
28 | * @throws ValidationException |
||
29 | */ |
||
30 | public function validate($value, $contextObject = null) |
||
36 | } |
||
37 |