An AlternativeValidator uses a list of sub-validators to validate the data.
More...
An AlternativeValidator uses a list of sub-validators to validate the data.
It does not implement any validation logic directly. The AlternativeValidator considers the data to be valid if any of the inner validators accepts the data.
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
◆ __construct()
Wikibase\Repo\Validators\AlternativeValidator::__construct |
( |
array |
$validators | ) |
|
- Parameters
-
ValueValidator[] | $validators | |
◆ setOptions()
Wikibase\Repo\Validators\AlternativeValidator::setOptions |
( |
array |
$options | ) |
|
- See also
- ValueValidator::setOptions()
- Parameters
-
◆ validate()
Wikibase\Repo\Validators\AlternativeValidator::validate |
( |
|
$value | ) |
|
- See also
- ValueValidator::validate()
- Parameters
-
mixed | $value | The value to validate |
- Returns
- Result
◆ $validators
Wikibase\Repo\Validators\AlternativeValidator::$validators |
|
private |
The documentation for this class was generated from the following file: