Skip to content

Commit

Permalink
Pass the property $validator as a parameter to the $callback Closure …
Browse files Browse the repository at this point in the history
…in the class ClosureValidationRule

Pass the property $validator as a parameter to the $callback Closure, so that we could take advantage of the existing $validator property in the class ClosureValidationRule.
  • Loading branch information
shinsenter authored Nov 15, 2023
1 parent 6e4ecc7 commit 82c29ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Validation/ClosureValidationRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function passes($attribute, $value)
$this->failed = true;

return $this->pendingPotentiallyTranslatedString($attribute, $message);
});
}, $this->validator);

return ! $this->failed;
}
Expand Down

0 comments on commit 82c29ee

Please sign in to comment.