Wikibase
MediaWiki Wikibase extension
|
An AlternativeValidator uses a list of sub-validators to validate the data. More...
Public Member Functions | |
__construct (array $validators) | |
validate ( $value) | |
setOptions (array $options) | |
Private Attributes | |
$validators | |
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.
Wikibase\Repo\Validators\AlternativeValidator::__construct | ( | array | $validators | ) |
ValueValidator[] | $validators |
Wikibase\Repo\Validators\AlternativeValidator::setOptions | ( | array | $options | ) |
array | $options |
Wikibase\Repo\Validators\AlternativeValidator::validate | ( | $value | ) |
mixed | $value | The value to validate |
|
private |