Class Socialveo\Core\validation\validator\Url

InheritanceSocialveo\Core\validation\validator\Url » Phalcon\Validation\Validator

Class Url

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$defaultScheme string The default URI scheme. Socialveo\Core\validation\validator\Url
$pattern string The regular expression used to validate the attribute value. Socialveo\Core\validation\validator\Url
$validSchemes array List of URI schemes which should be considered valid. Socialveo\Core\validation\validator\Url

Property Details

$defaultScheme public property

The default URI scheme. If the input doesn't contain the scheme part, the default scheme will be prepended to it (thus changing the input). Defaults to null, meaning a URL must contain the scheme part.

public string $defaultScheme null
$pattern public property

The regular expression used to validate the attribute value. The pattern may contain a {schemes} token that will be replaced by a regular expression which represents the $validSchemes.

public string $pattern '/^{schemes}:\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(?::\d{1,5})?(?:$|[?\/#])/i'
$validSchemes public property

List of URI schemes which should be considered valid. By default, http and https are considered to be valid schemes.

public array $validSchemes null

Method Details

validate() public method

public boolean validate ( Phalcon\Validation $validation, $field )
$validation Phalcon\Validation
$field string
validateValue() protected method

protected boolean validateValue ( $value )
$value mixed