jeudi 1 juin 2017

Issues with validation of signup form

I'm adding a validation to my sign up form , the validate code is working but the errors don't shows up in the page

PHP code

$this->validate($request, [
            'email'=> 'required|email|unique:users',
            'first_name'=> 'required|max:120',
            'password' => 'required|min:4'
            ]);

Welcome.blade.php code

@section('content')
@if(count($errors) > 0)
<div class="row">
    <div class="col-md-6">
        <ul>
            @foreach($errors->all() as $error)
                <li></li>
                @endforeach
        </ul>
    </div>
</div>
@endif

the php code is working because if i tried to register with an email that already taken it wont register but the error is that errors are not showing up in the welcome page



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire