Display Errors in View

PHOTO EMBED

Fri May 14 2021 22:54:35 GMT+0000 (UTC)

Saved by @slendabilt

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

This code will loop through errors found with validator (in controller) and display them in the view.