Writing Validators - laminas-validator - Laminas Docs this page demo is too simple.
I am trying to create a factory for my customed FormHashValidator, which need a formHashProcess() from BaseFuncModel I register to container via getServiceConfig()
That means I need to inject BaseFuncModel::class as dependency via its __construct() method.
But I found AbstractValidator itself have a __construct($options = null), the new custom FormHashValidator extend from AbstractValidator. If I create a factory and inject dependency from __construct(), It will overwrite the AbstractValidator’s own __construct(). I don’t know what will happend if I overwrite a built-in method.
Besides, I haven’t found a sample from website which use factory to inject dependency to a custom Validator.