The way Laravel outputs error messages is to include the form input name, which I find most of the time is not ideal. The easy way to customise this is pretty easy on a small scale. This may not suit larger forms.
In the blade file break each $error down into its own output. Put this where the error block will show.
@if (count($errors) > 0) <div class="alert alert-danger"> <ul> @if ($errors->has('firstname')) <li>A first name needs to be entered.</li> @endif @if ($errors->has('lastname')) <li>A last name needs to be entered.</li> @endif </ul> </div> @endif
Here are the elements from the form.
<div class="form-group"> <label for="title" class="muted col-sm-3 control-label">Given Name</label> <div class="col-sm-9"> <input type="text" name="firstname" class="form-control" id="firstname" placeholder="First Name" > </div> </div> <div class="form-group"> <label for="lastname" class="muted col-sm-3 control-label">Last Name</label> <div class="col-sm-9"> <input type="text" name="lastname" class="form-control" id="lastname" placeholder="Last Name" > </div> </div>
The lastname and firstname are the name elements of the form and are attributes used in the error message.