‪TYPO3CMS  ‪main
TYPO3\CMS\Extbase\Validation\Validator\DisjunctionValidator Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Validation\Validator\DisjunctionValidator:
TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator TYPO3\CMS\Extbase\Validation\Validator\ObjectValidatorInterface TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface

Public Member Functions

 __construct ()
 
 validate (mixed $value)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator
 setOptions (array $options)
 
 addValidator (ValidatorInterface $validator)
 
 removeValidator (ValidatorInterface $validator)
 
 count ()
 
 getValidators ()
 
 getOptions ()
 
 setValidatedInstancesContainer (\SplObjectStorage $validatedInstancesContainer)
 

Additional Inherited Members

- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator
 initializeDefaultOptions (array $options)
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator
array $supportedOptions = array( )
 
array $options = []
 
SplObjectStorage $validators
 
SplObjectStorage $validatedInstancesContainer
 

Detailed Description

Validator to chain many validators in a disjunction (logical or).

Definition at line 25 of file DisjunctionValidator.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extbase\Validation\Validator\DisjunctionValidator::__construct ( )

Definition at line 27 of file DisjunctionValidator.php.

Member Function Documentation

◆ validate()

TYPO3\CMS\Extbase\Validation\Validator\DisjunctionValidator::validate ( mixed  $value)

Checks if the given value is valid according to the validators of the disjunction.

So only one validator has to be valid, to make the whole disjunction valid. Errors are only returned if all validators failed.

Parameters
mixed$value‪The value that should be validated

Implements TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface.

Definition at line 42 of file DisjunctionValidator.php.

References $validator, TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator\$validators, and TYPO3\CMS\Extbase\Validation\Validator\AbstractCompositeValidator\getValidators().