Class CCaptchaValidator
CCaptchaValidator validates that the attribute value is the same as the verification code displayed in the CAPTCHA.
CCaptchaValidator should be used together with CCaptchaAction
.
- CComponent
- CValidator
- CCaptchaValidator
Package: system\validators
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/framework/validators/CCaptchaValidator.php
Copyright: 2008-2013 Yii Software LLC
License: http://www.yiiframework.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Since: 1.0
Located at x2engine/framework/validators/CCaptchaValidator.php
protected
|
#
validateAttribute(
Validates the attribute of the object. If there is any error, the error message is added to the object. |
protected
|
|
public
string
|
#
clientValidateAttribute(
Returns the JavaScript needed for performing client-side validation. |
addError(),
applyTo(),
createValidator(),
isEmpty(),
validate()
|
public
boolean
|
$caseSensitive | false |
#
whether the comparison is case sensitive. Defaults to false. |
public
string
|
$captchaAction | 'captcha' |
#
ID of the action that renders the CAPTCHA image. Defaults to 'captcha', meaning the 'captcha' action declared in the current controller. This can also be a route consisting of controller ID and action ID. |
public
boolean
|
$allowEmpty | false |
#
whether the attribute value can be null or empty. Defaults to false, meaning the attribute is invalid if it is empty. |
$attributes,
$builtInValidators,
$enableClientValidation,
$except,
$message,
$on,
$safe,
$skipOnError
|