I'm trying Fortify since one week now and I'm stuck on the same problem at two level.
The problem is when I try to update user password, it doesn't show me validation errors (I mean, when for test purpose I leave fields blank).
The same thing when I try to update user informations (name, email... when I leave them blank for test purpose).
Of course I tried to iterate the $errors variable to display errors message on my views but nothing. I also tried with the @error blade directive but nothing too.
Here's my update password view where I perform an PUT submit to the user-password.update route defined by Fortify
Thanks for your help.
You can use the following code in your blade
@if ($errors->updatePassword->any())
<ul>
@foreach($errors->updatePassword->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
@endif
This "$errors->updatePassword" is the Bag Name which will be found in "app/Actions/Fortify/UpdateUserPassword.php"
its work
@if ($errors->updatePassword->any())
<ul>
@foreach($errors->updatePassword->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
@endif
or you can change method validateWithBag('updatePassword')
in "app/Actions/Fortify/UpdateUserPassword.php" with validate()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With