F
Filamentβ€’7mo ago
CGM

How can I use @error blade directives in my custom form field blade files?

I know it's me missing something obvious, but I'm struggling to properly use @error() @enderror in my custom fields blade file. What goes inside of @error(<here>)? I attempted source diving and found $errors->has($statePath) but this gives me an error: array_key_exists(): Argument #1 ($key) must be a valid array offset type when I try to use it in my own blade template. This is a field created using artisan make:form-field, so nothing too special I don't think.
1 Reply
CGM
CGMOPβ€’7mo ago
$errors->has($getStatePath()) it seems. πŸ™‚
Want results from more Discord servers?
Add your server