diff --git a/src/Validator/BindForm.php b/src/Validator/BindForm.php index 1ca67ce..d52dd53 100644 --- a/src/Validator/BindForm.php +++ b/src/Validator/BindForm.php @@ -6,6 +6,7 @@ use Exception; use Kiri\Di\Interface\InjectParameterInterface; use Kiri\Router\Base\Middleware; use Kiri\Router\Interface\ValidatorInterface; +use Kiri\Router\Validator\Inject\Binding; use ReflectionException; use ReflectionNamedType; use ReflectionUnionType; @@ -37,6 +38,10 @@ class BindForm implements InjectParameterInterface $reflect = $container->getReflectionClass($this->formValidate); $object = $validator->setFormData($reflect->newInstanceWithoutConstructor()); foreach ($reflect->getProperties() as $property) { +// $binding = $property->getAttributes(Binding::class); +// if (count($binding) < 1) { +// continue; +// } foreach ($property->getAttributes() as $attribute) { if (!class_exists($attribute->getName())) { continue; diff --git a/src/Validator/Inject/Binding.php b/src/Validator/Inject/Binding.php new file mode 100644 index 0000000..4cc1e16 --- /dev/null +++ b/src/Validator/Inject/Binding.php @@ -0,0 +1,25 @@ +