Print one error not all validation errors

Posted 3 years ago by devanshul

I am working in laravel 5.2. I implement login functionality but it display all errors of validation rule. I want it display one error and also pass cursor to that place. I am using this code:

@if ($errors->has()) @foreach ($errors->all() as $error) {{ $error }} @endforeach @endif

Please sign in or create an account to participate in this conversation.