Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | */ |
||
34 | public function hasError(string $name, string $bag = 'default'): bool |
||
35 | { |
||
36 | $errors = View::shared('errors', fn () => request()->session()->get('errors', new ViewErrorBag)); |
||
|
|||
37 | |||
38 | $name = str_replace(['[', ']'], ['.', ''], $name); |
||
39 | |||
40 | return $errors->getBag($bag)->has($name); |
||
41 | } |
||
43 |