From 8f730e13badda1f06eb4cc814a41f74d3bb2ebae Mon Sep 17 00:00:00 2001 From: xl Date: Fri, 10 Nov 2023 15:30:30 +0800 Subject: [PATCH] eee --- src/Validator/Validator.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Validator/Validator.php b/src/Validator/Validator.php index 8756dd4..604840b 100644 --- a/src/Validator/Validator.php +++ b/src/Validator/Validator.php @@ -81,6 +81,9 @@ class Validator $method = Kiri::getDi()->getReflectionClass($this->formData::class); foreach ($params as $name => $value) { + if (!$method->hasProperty($name)) { + continue; + } $rules = $this->rules[$name] ?? []; foreach ($rules as $item) { /** @var ValidatorInterface $item */