N
N
Nevershot2017-09-12 20:28:46
Laravel
Nevershot, 2017-09-12 20:28:46

Why are validation errors not showing up in Laravel?

When the array is displayed through the foreash loop, the data is not displayed, the validation checked everything works, but for some reason nothing goes into the $errors array 89fd35bfe58f4e6db943782ce776ebed.png.

@if($errors->any())
            <div class="alert alert-danger">
                <ul>
                    @foreach($errors->all() as $error)
                        <li>{{$error}}</li>
                    @endforeach

                </ul>
            </div>
        @endif

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kuznetsov, 2017-09-13
@dima9595

1. Why are you showing the Kernel file?
2. Try without @if($errors->any()).
3. How do you do validation?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question