Total Complexity | 2 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class GovernmentEmailRule implements Rule |
||
9 | { |
||
10 | /** |
||
11 | * Validation for government email. |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | const PATTERN = '^[a-zA-Z0-9._%+-]+@(?:[a-zA-Z0-9-_]+\.)+ca$'; |
||
16 | |||
17 | /** |
||
18 | * |
||
19 | * @param string $attribute |
||
20 | * @param mixed $value |
||
21 | * @return boolean |
||
22 | */ |
||
23 | public function passes($attribute, $value) |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * Get the validation error message. |
||
30 | * |
||
31 | * @return string |
||
32 | */ |
||
33 | public function message() |
||
38 |