Conditions | 5 |
Paths | 3 |
Total Lines | 23 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | public function errorMessages() { |
||
20 | $messages = $this->validators->errorMessages(); |
||
21 | |||
22 | /** |
||
23 | * Rewrite required to required_if for items inside conditional selects |
||
24 | */ |
||
25 | if ($this->parent() instanceof LsfConditionalSelect) { |
||
26 | foreach ($messages as $key => $rule) { |
||
27 | if (Str::endsWith($key, 'required')) { |
||
28 | $messages[$key . '_if'] = $messages[$key]; |
||
29 | |||
30 | unset($messages[$key]); |
||
31 | } |
||
32 | } |
||
33 | } |
||
34 | |||
35 | return $messages; |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * Returns the Input’s response after the form has been submitted and validated |
||
40 | * |
||
41 | * @param $input |
||
42 | * @return mixed |
||
52 | } |