php - Display error of specific forms -


i have 2 forms on page (a blade template). want display form errors use:

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

now have errors on both forms: enter image description here

you can use laravel validation error. throw specific error in specific field. have use in every input control.

@if ($errors->has('input_name'))<p class="text-danger"> {!!$errors->first('input_name')!!}</p>@endif 

Comments

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -