coderego
8 months ago
14
2
Vue

Keep modal open if form has errors?

Posted 8 months ago by coderego

I have a form in a vue-modal, I would like for the modal to stay open if count($errors). How can I do this? I tried the following to no avail:

@if (count($errors))
                <ul class="alert alert-danger" @load="$modal.show('new-form')">
                    @foreach ($errors->all() as $error)
                        <li>{{ $error }}</li>
                    @endforeach
                </ul>
@endif

Please sign in or create an account to participate in this conversation.