You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Zend\Validator\Regex::__construct(), 0 passed in <REDACTED>/vendor/zendframework/zend-servicemanager/src/Factory/InvokableFactory.php on line 30 and exactly 1 expected in <REDACTED>/vendor/zendframework/zend-validator/src/Regex.php:51
Stack trace:
#0 <REDACTED>/vendor/zendframework/zend-servicemanager/src/Factory/InvokableFactory.php(30): Zend\Validator\Regex->__construct()
#1 <REDACTED>/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(758): Zend\ServiceManager\Factory\InvokableFactory->__invoke(Object(Zend\ServiceManager\ServiceManager), 'Zend\\Validator\\...', NULL)
#2 <REDACTED>/vendor/zendframework/zend-servicemanager/src/Servic in <REDACTED>/vendor/zendframework/zend-validator/src/Regex.php on line 51
Both the approaches of passing options to the ValidatorPluginManager and configuring the validator after invocation work fine for all validators except Regex. From what I can tell, the Regex validator is the only one in the zendframework/zend-validator package where the constructor parameter is mandatory:
Everything works fine using the first approach above, and it may be a deliberate design decision for the Regex contructor parameter to be mandatory, but it appeared out of place to me so I thought it worth mentioning in case this was an oversight.
The text was updated successfully, but these errors were encountered:
I can obtain a
Regex
validator from theValidatorPluginManager
like so:However, if I attempt to obtain a
Regex
validator without the options (to configure it later) I received a PHP Fatal error:Both the approaches of passing options to the
ValidatorPluginManager
and configuring the validator after invocation work fine for all validators exceptRegex
. From what I can tell, theRegex
validator is the only one in thezendframework/zend-validator
package where the constructor parameter is mandatory:For all the other validators the contructor parameters are optional, which is exactly how the
AbstractValidator
describes it:Everything works fine using the first approach above, and it may be a deliberate design decision for the
Regex
contructor parameter to be mandatory, but it appeared out of place to me so I thought it worth mentioning in case this was an oversight.The text was updated successfully, but these errors were encountered: