1 | <?php |
||
13 | class CheckPattern implements ValidatorInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | private $pattern; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private $error; |
||
24 | |||
25 | /** |
||
26 | * @param string $pattern regular expression pattern to match |
||
27 | * @param string $error error message |
||
28 | */ |
||
29 | 5 | public function __construct($pattern, $error) |
|
34 | |||
35 | 1 | public function validate(FieldInterface $field, InputModel $model, InputValidation $validation) |
|
47 | } |
||
48 |