PHP 클래스 yii\validators\UrlValidator

Note that this validator only checks if the URL scheme and host part are correct. It does not check the remaining parts of a URL.
부터: 2.0
저자: Qiang Xue ([email protected])
상속: extends Validator
파일 보기 프로젝트 열기: yiisoft/yii2 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$defaultScheme 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.
$enableIDN 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.
$pattern 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]].
$validSchemes list of URI schemes which should be considered valid. By default, http and https are considered to be valid schemes.

공개 메소드들

메소드 설명
clientValidateAttribute ( $model, $attribute, $view )
init ( )
validateAttribute ( $model, $attribute )

보호된 메소드들

메소드 설명
validateValue ( $value )

메소드 상세

clientValidateAttribute() 공개 메소드

public clientValidateAttribute ( $model, $attribute, $view )

init() 공개 메소드

public init ( )

validateAttribute() 공개 메소드

public validateAttribute ( $model, $attribute )

validateValue() 보호된 메소드

protected validateValue ( $value )

프로퍼티 상세

$defaultScheme 공개적으로 프로퍼티

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

$enableIDN 공개적으로 프로퍼티

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

$pattern 공개적으로 프로퍼티

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

$validSchemes 공개적으로 프로퍼티

list of URI schemes which should be considered valid. By default, http and https are considered to be valid schemes.
public $validSchemes