Conditions | 3 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
20 | public function isValid() |
||
21 | { |
||
22 | if ($this->data !== null && !preg_match("/".$this->attributes['arg']."/", $this->data)) { |
||
23 | $this->setErrorMessage($this->attributes["validatorName"], Lang::get("validator.regex", [ |
||
24 | 'format' => $this->attributes['arg'], |
||
25 | 'name' => $this->attributes["name"], |
||
26 | 'value' => $this->data |
||
27 | ], "{name} ({value}) is not in the expected format {format}.")); |
||
28 | |||
29 | return false; |
||
30 | } |
||
31 | return true; |
||
32 | } |
||
33 | } |
||
34 |