From a5b5e10e5ec2953ca0c03cc6f894efdc774c2f42 Mon Sep 17 00:00:00 2001 From: whwyy Date: Fri, 15 Dec 2023 19:45:05 +0800 Subject: [PATCH] eee --- src/Validator/BindForm.php | 3 +-- src/Validator/Binding.php | 2 +- src/Validator/Types/BoolProxy.php | 1 + src/Validator/Types/FloatProxy.php | 1 + src/Validator/Types/StringProxy.php | 1 + 5 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Validator/BindForm.php b/src/Validator/BindForm.php index 197f6c3..99a7564 100644 --- a/src/Validator/BindForm.php +++ b/src/Validator/BindForm.php @@ -93,8 +93,7 @@ class BindForm implements InjectParameterInterface $validator->setAlias($property->getName(), $rule->field); } - $typeProxy = $this->_typeValidator($property); - $validator->addRule($property->getName(), [$typeProxy, false]); + $validator->addRule($property->getName(), [$this->_typeValidator($property), 'dispatch', false]); } diff --git a/src/Validator/Binding.php b/src/Validator/Binding.php index b1cd614..08497f9 100644 --- a/src/Validator/Binding.php +++ b/src/Validator/Binding.php @@ -94,7 +94,7 @@ class Binding implements RequestFilterInterface if ($class['class'] === RequiredValidatorFilter::class) { $isFirst = true; } - return [Kiri::createObject($class), $isFirst]; + return [Kiri::createObject($class), 'dispatch', $isFirst]; } } \ No newline at end of file diff --git a/src/Validator/Types/BoolProxy.php b/src/Validator/Types/BoolProxy.php index 5ec89a5..e01ec49 100644 --- a/src/Validator/Types/BoolProxy.php +++ b/src/Validator/Types/BoolProxy.php @@ -9,6 +9,7 @@ class BoolProxy extends TypesProxy /** * @param object $form + * @param string $field * @param mixed $value * @return bool */ diff --git a/src/Validator/Types/FloatProxy.php b/src/Validator/Types/FloatProxy.php index 09b60b0..5222cc0 100644 --- a/src/Validator/Types/FloatProxy.php +++ b/src/Validator/Types/FloatProxy.php @@ -8,6 +8,7 @@ class FloatProxy extends TypesProxy /** * @param object $form + * @param string $field * @param mixed $value * @return bool */ diff --git a/src/Validator/Types/StringProxy.php b/src/Validator/Types/StringProxy.php index a277bb0..ba47738 100644 --- a/src/Validator/Types/StringProxy.php +++ b/src/Validator/Types/StringProxy.php @@ -9,6 +9,7 @@ class StringProxy extends TypesProxy /** * @param object $form + * @param string $field * @param mixed $value * @return bool */