validators\UrlValidator validateAttribute()

validateAttribute() public method Validates a single attribute. Child classes must implement this method to provide the actual validation logic. public void validateAttribute ( $model, $attribute )$model yii\base\Model The data model to be validated $attribute string The name of the attribute to be validated.

validators\UrlValidator init()

init() public method Initializes the object. This method is invoked at the end of the constructor after the object is initialized with the given configuration. public void init ( )

validators\UrlValidator clientValidateAttribute()

clientValidateAttribute() public method Returns the JavaScript needed for performing client-side validation. You may override this method to return the JavaScript validation code if the validator can support client-side validation. The following JavaScript variables are predefined and can be used in the validation code: attribute: an object describing the the attribute being validated. value: the value being validated. messages: an array used to hold the validation error messages for the

validators\UrlValidator $enableIDN

$enableIDN public property Whether validation process should take into account IDN (internationalized domain names). Defaults to false meaning that validation of URLs containing IDN will always fail. Note that in order to use IDN validation you have to install and enable intl PHP extension, otherwise an exception would be thrown. public boolean $enableIDN = false

validators\UrlValidator $validSchemes

$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 = ['http', 'https']

validators\UrlValidator $defaultScheme

$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

validators\UrlValidator $pattern

$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'

validators\UniqueValidator validateAttribute()

validateAttribute() public method Validates a single attribute. Child classes must implement this method to provide the actual validation logic. public void validateAttribute ( $model, $attribute )$model yii\base\Model The data model to be validated $attribute string The name of the attribute to be validated.

validators\UniqueValidator $targetClass

$targetClass public property The name of the ActiveRecord class that should be used to validate the uniqueness of the current attribute value. If not set, it will use the ActiveRecord class of the attribute being validated. See also $targetAttribute. public string $targetClass = null

validators\UniqueValidator $targetAttribute

$targetAttribute public property The name of the ActiveRecord attribute that should be used to validate the uniqueness of the current attribute value. If not set, it will use the name of the attribute currently being validated. You may use an array to validate the uniqueness of multiple columns at the same time. The array values are the attributes that will be used to validate the uniqueness, while the array keys are the attributes whose values are to be validated. If the key and the value