Validator for checking that a given string is NOT an EntityId.
More...
Validator for checking that a given string is NOT an EntityId.
Useful e.g. for preventing property labels that "look like" property IDs.
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
◆ __construct()
Wikibase\Repo\Validators\NotEntityIdValidator::__construct |
( |
EntityIdParser |
$idParser, |
|
|
|
$errorCode, |
|
|
array |
$forbiddenTypes = null |
|
) |
| |
- Parameters
-
EntityIdParser | $idParser | The parser to use for testing whether a string is an entity ID. |
string | $errorCode | The error code to use when this validator fails. |
string[] | null | $forbiddenTypes | A list of entity types who's IDs should be considered invalid values. If null, all valid entity IDs are considered invalid input. |
- Exceptions
-
◆ setOptions()
Wikibase\Repo\Validators\NotEntityIdValidator::setOptions |
( |
array |
$options | ) |
|
- See also
- ValueValidator::setOptions()
- Parameters
-
◆ validate()
Wikibase\Repo\Validators\NotEntityIdValidator::validate |
( |
|
$value | ) |
|
- See also
- ValueValidator::validate()
- Parameters
-
string | $value | The value to validate |
- Returns
- Result
◆ $errorCode
Wikibase\Repo\Validators\NotEntityIdValidator::$errorCode |
|
private |
◆ $forbiddenTypes
Wikibase\Repo\Validators\NotEntityIdValidator::$forbiddenTypes |
|
private |
◆ $idParser
Wikibase\Repo\Validators\NotEntityIdValidator::$idParser |
|
private |
The documentation for this class was generated from the following file: