This repository has been archived by the owner on Jan 2, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 107
ErrorBag Definition #19
Comments
Do you mean something like this? <x-form error-bag="login">
{{-- --}}
</x-form>
<x-form error-bag="register">
{{-- --}}
</x-form> |
Yes, exactly this. |
With the recent support for error bag should be fixed also for single input hasError() like here: The check must be: @error('field', 'errorBagName') is-invalid @enderror Setting error bag on form level would be better to avoid to pass bag name to each component |
I added that in preparation for solving this issue :) A Blade Component can't access their parent's data because the compiler renders the children/slots before the parent. Marcel is working on a PR to support this. Whenever that gets merged, we'll be able to do bindings and setting the bag on the <x-form error-bag="profile" :bind="$user">
<x-form-input name="biography" />
</x-form> I'll leave this issue open until then. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
thank you very much for your work and willing to share it.
Is it possible to set the ErrorBag in the x-form element? It would be useful when displaying more than one form on a single page.
Thanks
The text was updated successfully, but these errors were encountered: