All Classes Namespaces Files Functions Variables Pages
DisjunctionValidator Class Reference
Inheritance diagram for DisjunctionValidator:
AbstractCompositeValidator ObjectValidatorInterface ValidatorInterface

Public Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from AbstractCompositeValidator
 $supportedOptions = []
 $options = []

Detailed Description

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

Definition at line 22 of file DisjunctionValidator.php.

Member Function Documentation

validate (   $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.

mixed$valueThe value that should be validated

Implements ValidatorInterface.

Definition at line 35 of file DisjunctionValidator.php.

References AbstractCompositeValidator\$validators, and AbstractCompositeValidator\getValidators().