Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 14598f6

Browse files
committed
feat: attribute mapping in favor of potentially indexed mapping
1 parent d1c8daf commit 14598f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Validation/Rules/AnyOf.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public function passes($attribute, $value)
6060

6161
foreach ($this->rules as $rule) {
6262
$validator = Validator::make(
63-
Arr::wrap($value),
64-
Arr::isAssoc(Arr::wrap($rule)) ? $rule : [$rule],
63+
Arr::isAssoc(Arr::wrap($value)) ? $value : [$attribute => $value],
64+
Arr::isAssoc(Arr::wrap($rule)) ? $rule : [$attribute => $rule],
6565
$this->validator->customMessages,
6666
$this->validator->customAttributes
6767
);

0 commit comments

Comments
 (0)