__clone()
__construct()
__invoke()
__sleep()
addByName()
addValidator()
attach()
attachByName()
count()
getMessages()
getPluginManager()
getValidators()
isValid()
merge()
plugin()
prependByName()
prependValidator()
setPluginManager()
$messages
$plugins
$validators
DEFAULT_PRIORITY
__clone()
__construct()
__invoke(mixed $value) : bool
mixed
bool
__sleep() : array
Plugin manager (property 'plugins') cannot be serialized. On wakeup the property remains unset and next invocation to getPluginManager() sets the default plugin manager instance (ValidatorPluginManager).
array
addByName(string $name, array $options, bool $breakChainOnFailure) : \Zend\Validator\ValidatorChain
deprecated | Please use attachByName() |
---|
string
array
bool
addValidator(\Zend\Validator\ValidatorInterface $validator, bool $breakChainOnFailure, int $priority) : \Zend\Validator\ValidatorChain
deprecated | Please use attach() |
---|
\Zend\Validator\ValidatorInterface
bool
int
\Zend\Validator\ValidatorChain
Provides a fluent interfaceattach(\Zend\Validator\ValidatorInterface $validator, bool $breakChainOnFailure, int $priority) : \Zend\Validator\self
If $breakChainOnFailure is true, then if the validator fails, the next validator in the chain, if one exists, will not be executed.
\Zend\Validator\ValidatorInterface
bool
int
Priority at which to enqueue validator; defaults to 1 (higher executes earlier)
\Zend\Validator\Exception\InvalidArgumentException |
---|
\Zend\Validator\self
attachByName(string $name, array $options, bool $breakChainOnFailure, int $priority) : \Zend\Validator\ValidatorChain
string
array
bool
int
count() : int
int
getMessages() : array
The array keys are validation failure message identifiers, and the array values are the corresponding human-readable message strings.
If isValid() was never called or if the most recent isValid() call returned true, then this method returns an empty array.
array
getPluginManager() : \Zend\Validator\ValidatorPluginManager
isValid(mixed $value, mixed $context) : bool
Validators are run in the order in which they were added to the chain (FIFO).
mixed
mixed
Extra "context" to provide the validator
\Zend\Validator\Exception\RuntimeException |
If validation of $value is impossible |
---|
bool
merge(\Zend\Validator\ValidatorChain $validatorChain) : \Zend\Validator\ValidatorChain
plugin(string $name, array $options) : \Zend\Validator\ValidatorInterface
string
Name of validator to return
nullarray
Options to pass to validator constructor (if not already instantiated)
prependByName(string $name, array $options, bool $breakChainOnFailure) : \Zend\Validator\ValidatorChain
string
array
bool
prependValidator(\Zend\Validator\ValidatorInterface $validator, bool $breakChainOnFailure) : \Zend\Validator\ValidatorChain
If $breakChainOnFailure is true, then if the validator fails, the next validator in the chain, if one exists, will not be executed.
\Zend\Validator\ValidatorInterface
bool
\Zend\Validator\ValidatorChain
Provides a fluent interfacesetPluginManager(\Zend\Validator\ValidatorPluginManager $plugins) : \Zend\Validator\ValidatorChain
DEFAULT_PRIORITY