diff --git a/system/Validation/Validation.php b/system/Validation/Validation.php index 0b49fe02c48b..b10711978068 100644 --- a/system/Validation/Validation.php +++ b/system/Validation/Validation.php @@ -337,7 +337,7 @@ protected function processRules( // @phpstan-ignore-next-line $error may be set by rule methods. $this->errors[$field] = $error ?? $this->getErrorMessage( - ($this->isClosure($rule) || $arrayCallable) ? $i : $rule, + ($this->isClosure($rule) || $arrayCallable) ? (string) $i : $rule, $field, $label, $param,