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

php - Autoloader issue not returning Class -

C++ Program To Find Smallest and Largest Number In Array -

java - How to put two numbers separated by a space into two different arrays -