UrlLike
Piwik\Validators\
UrlLike
Validator that fails for a value that does not look like a URL.
Methods
The class defines the following methods:
validate()— Validates the given value and throws an exception if it is invalid.check()ash; Lets you easily check a value against multiple validators. Inherited fromBaseValidator
validate()
Validates the given value and throws an exception if it is invalid.
Signature
- It accepts the following parameter(s):
$value(mixed) — The value to validate.
- It does not return anything or a mixed result.
check()
Lets you easily check a value against multiple validators.
Signature
- It accepts the following parameter(s):
$name(string) — The name/description of the field you want to validate the value for. The name will be prefixed in case there is any error.$value(mixed) — The value which needs to be tested$validators(BaseValidator[]) — The validators to apply, in order.
- It does not return anything or a mixed result.