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
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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