Hello everyone.
I've a Form Request with this rule:
"password" => "confirmed"
This solution works well in L5.3 because the rule itself has a bug, if you pass two empty fields like
"password" => ""
"password_confirmation" => ""
they will be validated because both are empty strings ("").
Even though this is a bug, I guess, it's fine in a certain degree because my application does other checks after the request anyway but in L5.4 every empty fields are converted to null and the "confirmed" rule alone does not work anymore because of the new middleware.
I tried
"password" => "sometimes|confirmed"
but it does not work because the key exists.
My question is simple:
Is there a validation rule that works similar to sometimes but it checks nullable values instead?
I would like to keep the middleware though.