laravel-frontend-presets / tall

A TALL (Tailwind CSS, Alpine.js, Laravel and Livewire) Preset for Laravel
MIT License
2.46k stars 207 forks source link

User registration test incompatibility with Livewire 2.2.4 #65

Closed michaeldyrynda closed 4 years ago

michaeldyrynda commented 4 years ago

This is just to flag livewire/livewire#1635 for a regression in how Livewire 2.2.4 handles validation rules, in case anybody hits it with a new app.

It means that, out of the box, the registration test will fail as Livewire no longer passes the passwordConfirmation property to the validation rules unless explicitly keyed in the rules.

The current userland workaround would be to update the validation rule:


$this->validate([
     'name' => ['required'],
     'email' => ['required', 'email', 'unique:users'],
-    'password' => ['required', 'min:8', 'same:passwordConfirmation'],
+    'password' => ['required', 'min:8'],
+    'passwordConfirmation' => ['same:password'],
]);
michaeldyrynda commented 4 years ago

This is also affecting the Reset component and ResetTest in the same manner.

ryangjchandler commented 4 years ago

Thanks for flagging this @michaeldyrynda - looks like your PR was merged and this issue can be closed now. Thanks again!

michaeldyrynda commented 4 years ago

I meant to come back and close this 😅