Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 2 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | 10 | public function rules(): array |
|
24 | { |
||
25 | return [ |
||
26 | // name, email, subject and body are required |
||
27 | 10 | [['name', 'email', 'subject', 'body'], 'required'], |
|
28 | // email has to be a valid email address |
||
29 | ['email', 'email'], |
||
30 | // verifyCode needs to be entered correctly |
||
31 | ['verifyCode', \yii\captcha\CaptchaValidator::class], |
||
32 | ]; |
||
35 |