-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passes method of custom validation rule receives array keys with dotPlaceholder #34263
Comments
I don't believe we allow dots in input variables during validation because dots have special meaning with array depth validation in Laravel. |
Ping @themsaid |
This worked just fine prior to version 7 with the |
Fixed in upcoming patch release. |
@taylorotwell is this being patched in v7 also? |
Issue is still actual for 6.x |
Description:
When validating an array with a custom validation Rule, the
$value
param of the rule'spasses()
method receives the array with dot placeholders included in keys. This makes it impossible to validate array keys containing dots.Related to #33357
Steps To Reproduce:
Send a request with an array query parameter that has keys containing dots e.g.
foo[foo.bar]=baz
Validate with a custom validation rule e.g.
['foo' => new CustomRule()]
dd()
the$value
param of thepasses()
method and the result will be something like:['fooP0gffDX4ilGw68H6bar' => 'baz']
The text was updated successfully, but these errors were encountered: