Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | 20 | public function isValid($value) |
|
17 | { |
||
18 | // This regexp should be kep in sync with the original one in Natural |
||
19 | 20 | if (!preg_match('/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[^@]+\.[^@]+$/u', $value)) { |
|
20 | 12 | $this->error(self::INVALID_LOCAL_PART); |
|
21 | |||
22 | 12 | return false; |
|
23 | } |
||
24 | |||
25 | 8 | return parent::isValid($value); |
|
26 | } |
||
28 |