The 'matches' validation rule fails even though I'm sure its correct |
The issue here is that you have setPassword() which sets password_hash and then your rule in model is trying to match $attributes['password'] with $attributes['password-confirm'] the issue is that your entity contains $attributes['password_hash'] and not $attributes['password'] just note that validation in model class will be working with $attributes array which can be modified with setters so you should either hash the 'password-confirm' and match is with 'password_hash' or set the not hashed password in $attributes['password'] as well in the setter.
|
Messages In This Thread |
The 'matches' validation rule fails even though I'm sure its correct - by Polymorphism - 06-09-2021, 01:28 AM
RE: The 'matches' validation rule fails even though I'm sure its correct - by InsiteFX - 06-09-2021, 03:34 AM
RE: The 'matches' validation rule fails even though I'm sure its correct - by Polymorphism - 06-09-2021, 05:05 AM
RE: The 'matches' validation rule fails even though I'm sure its correct - by paliz - 06-09-2021, 10:54 AM
RE: The 'matches' validation rule fails even though I'm sure its correct - by InsiteFX - 06-09-2021, 09:11 PM
RE: The 'matches' validation rule fails even though I'm sure its correct - by paliz - 06-09-2021, 10:30 PM
RE: The 'matches' validation rule fails even though I'm sure its correct - by najdanovicivan - 06-16-2021, 04:13 PM
|