RegexValidator checks a string against a regular expression.
More...
RegexValidator checks a string against a regular expression.
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
◆ __construct()
Wikibase\Repo\Validators\RegexValidator::__construct |
( |
|
$expression, |
|
|
|
$inverse = false , |
|
|
|
$errorCode = 'malformed-value' |
|
) |
| |
- Parameters
-
string | $expression | |
bool | $inverse | |
string | $errorCode | code to use when this validator fails. |
◆ setOptions()
Wikibase\Repo\Validators\RegexValidator::setOptions |
( |
array |
$options | ) |
|
- See also
- ValueValidator::setOptions()
- Parameters
-
◆ validate()
Wikibase\Repo\Validators\RegexValidator::validate |
( |
|
$value | ) |
|
- See also
- ValueValidator::validate()
- Parameters
-
string | $value | The value to validate |
- Returns
- Result
◆ $errorCode
Wikibase\Repo\Validators\RegexValidator::$errorCode |
|
private |
◆ $expression
Wikibase\Repo\Validators\RegexValidator::$expression |
|
private |
◆ $inverse
Wikibase\Repo\Validators\RegexValidator::$inverse |
|
private |
The documentation for this class was generated from the following file: