PHP 클래스 yii\captcha\CaptchaValidator

CaptchaValidator should be used together with CaptchaAction. Note that once CAPTCHA validation succeeds, a new CAPTCHA will be generated automatically. As a result, CAPTCHA validation should not be used in AJAX validation mode because it may fail the validation even if a user enters the same code as shown in the CAPTCHA image which is actually different from the latest CAPTCHA code.
부터: 2.0
저자: Qiang Xue ([email protected])
상속: extends yii\validators\Validator
파일 보기 프로젝트 열기: yiisoft/yii2 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$captchaAction the route of the controller action that renders the CAPTCHA image.
$caseSensitive whether the comparison is case sensitive. Defaults to false.
$skipOnEmpty whether to skip this validator if the input is empty.

공개 메소드들

메소드 설명
clientValidateAttribute ( $model, $attribute, $view )
createCaptchaAction ( ) : CaptchaAction Creates the CAPTCHA action object from the route specified by [[captchaAction]].
init ( )

보호된 메소드들

메소드 설명
validateValue ( $value )

메소드 상세

clientValidateAttribute() 공개 메소드

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

createCaptchaAction() 공개 메소드

Creates the CAPTCHA action object from the route specified by [[captchaAction]].
public createCaptchaAction ( ) : CaptchaAction
리턴 CaptchaAction the action object

init() 공개 메소드

public init ( )

validateValue() 보호된 메소드

protected validateValue ( $value )

프로퍼티 상세

$captchaAction 공개적으로 프로퍼티

the route of the controller action that renders the CAPTCHA image.
public $captchaAction

$caseSensitive 공개적으로 프로퍼티

whether the comparison is case sensitive. Defaults to false.
public $caseSensitive

$skipOnEmpty 공개적으로 프로퍼티

whether to skip this validator if the input is empty.
public $skipOnEmpty