| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 27 | public function rules() |
||
| 28 | { |
||
| 29 | $captchaRequiredPlug = ''; |
||
| 30 | |||
| 31 | if (config('blog.services.reCaptchStatus')) { |
||
| 32 | $captchaRequiredPlug = 'required'; // Rule |
||
| 33 | $this->captchaCheck(); // Check |
||
| 34 | } |
||
| 35 | |||
| 36 | return [ |
||
| 37 | 'firstname' => 'required|max:255|string', |
||
| 38 | 'lastname' => 'max:255|string', |
||
| 39 | 'email' => 'required|max:255|email', |
||
| 40 | 'phone' => 'numeric|nullable', |
||
| 41 | 'message' => 'required|max:500|string', |
||
| 42 | 'g-recaptcha-response' => $captchaRequiredPlug, |
||
| 43 | ]; |
||
| 58 |