1 | <?php |
||
21 | class RegularExpressionValidator extends Validator |
||
22 | { |
||
23 | /** |
||
24 | * @var string the regular expression to be matched with |
||
25 | */ |
||
26 | public $pattern; |
||
27 | /** |
||
28 | * @var bool whether to invert the validation logic. Defaults to false. If set to true, |
||
29 | * the regular expression defined via [[pattern]] should NOT match the attribute value. |
||
30 | */ |
||
31 | public $not = false; |
||
32 | |||
33 | |||
34 | /** |
||
35 | * @inheritdoc |
||
36 | */ |
||
37 | 4 | public function init() |
|
47 | |||
48 | /** |
||
49 | * @inheritdoc |
||
50 | */ |
||
51 | 2 | protected function validateValue($value) |
|
59 | } |
||
60 |