From 82c29eeacdd3927a3d5c8cef393d4119d460dba1 Mon Sep 17 00:00:00 2001 From: Shin <2082119+shinsenter@users.noreply.github.com> Date: Thu, 16 Nov 2023 08:06:07 +0900 Subject: [PATCH] Pass the property $validator as a parameter to the $callback Closure 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. --- src/Illuminate/Validation/ClosureValidationRule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Validation/ClosureValidationRule.php b/src/Illuminate/Validation/ClosureValidationRule.php index fc57dadd5673..43dffe55cc57 100644 --- a/src/Illuminate/Validation/ClosureValidationRule.php +++ b/src/Illuminate/Validation/ClosureValidationRule.php @@ -64,7 +64,7 @@ public function passes($attribute, $value) $this->failed = true; return $this->pendingPotentiallyTranslatedString($attribute, $message); - }); + }, $this->validator); return ! $this->failed; }