captcha\CaptchaValidator 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

captcha\CaptchaValidator createCaptchaAction()

createCaptchaAction() public method Creates the CAPTCHA action object from the route specified by $captchaAction. public yii\captcha\CaptchaAction createCaptchaAction ( )return yii\captcha\CaptchaAction The action object throws yii\base\InvalidConfigException

captcha\CaptchaAsset $js

$js public property public $js = ['yii.captcha.js']

captcha\CaptchaValidator $captchaAction

$captchaAction public property The route of the controller action that renders the CAPTCHA image. public string $captchaAction = 'site/captcha'

captcha\CaptchaAsset $sourcePath

$sourcePath public property public $sourcePath = '@yii/assets'

captcha\CaptchaAsset $depends

$depends public property public $depends = ['yii\web\YiiAsset']

captcha\CaptchaAction renderImageByImagick()

renderImageByImagick() protected method Renders the CAPTCHA image based on the code using ImageMagick library. protected string renderImageByImagick ( $code )$code string The verification code return string Image contents in PNG format.

captcha\CaptchaAction setHttpHeaders()

setHttpHeaders() protected method Sets the HTTP headers needed by image response. protected void setHttpHeaders ( )

captcha\CaptchaAction validate()

validate() public method Validates the input to see if it matches the generated code. public boolean validate ( $input, $caseSensitive )$input string User input $caseSensitive boolean Whether the comparison should be case-sensitive return boolean Whether the input is valid

captcha\CaptchaAction renderImageByGD()

renderImageByGD() protected method Renders the CAPTCHA image based on the code using GD library. protected string renderImageByGD ( $code )$code string The verification code return string Image contents in PNG format.