lundi 16 novembre 2020

my project laravel when i click submit in form with errors in input my view refresh multiple time so i can't see message errors

this my view code here i try to do form with validate and div with type of errors:

@if(count($errors) > 0)
    <div class="alert alert-danger">
        <ul>
            @foreach ($errors->all() as $error)
                <li></li>
            @endforeach
        </ul>
    </div>
@endif
<form action="add" method="POST">
 <!--Securite-->
    Product name <input type="text" value="" class="form-control " name="name" placeholder="enter product">
<br>
    Product Price <input type="text"  class="form-control " value="" name="price" placeholder="enter price">
<br>
<input type="submit" value="Add Product">
</form>
@endsection


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/32QQuGF
via IFTTT

Aucun commentaire:

Enregistrer un commentaire