framework/captcha/CaptchaValidator.php
public function getClientOptions($model, $attribute)
    {
        $captcha = $this->createCaptchaAction();
        $code = $captcha->getVerifyCode(false);
        $hash = $captcha->generateValidationHash($this->caseSensitive ? $code : strtolower($code));
        $options = [
            'hash' => $hash,
            'hashKey' => 'yiiCaptcha/' . $captcha->getUniqueId(),
            'caseSensitive' => $this->caseSensitive,
            'message' => Yii::$app->getI18n()->format($this->message, [
                'attribute' => $model->getAttributeLabel($attribute),
            ], Yii::$app->language),
        ];
        if ($this->skipOnEmpty) {
            $options['skipOnEmpty'] = 1;
        }

        return $options;
    }
public function getClientOptions($model, $attribute)
    {
        $captcha = $this->createCaptchaAction();
        $code = $captcha->getVerifyCode(false);
        $hash = $captcha->generateValidationHash($this->caseSensitive ? $code : strtolower($code));
        $options = [
            'hash' => $hash,
            'hashKey' => 'yiiCaptcha/' . $captcha->getUniqueId(),
            'caseSensitive' => $this->caseSensitive,
            'message' => Yii::$app->getI18n()->format($this->message, [
                'attribute' => $model->getAttributeLabel($attribute),
            ], Yii::$app->language),
        ];
        if ($this->skipOnEmpty) {
            $options['skipOnEmpty'] = 1;
        }

        return $options;
    }
public function getClientOptions ( $ model , $ attribute ) { $ captcha = $ this -> createCaptchaAction ( ) ; $ code = $ captcha -> getVerifyCode ( false ) ; $ hash = $ captcha -> generateValidationHash ( $ this -> caseSensitive ? $ code : strtolower ( $ code ) ) ; $ options = [ 'hash' => $ hash , 'hashKey' => 'yiiCaptcha/' . $ captcha -> getUniqueId ( ) , 'caseSensitive' => $ this -> caseSensitive , 'message' => Yii :: $ app -> getI18n ( ) -> format ( $ this -> message , [ 'attribute' => $ model -> getAttributeLabel ( $ attribute ) , ] , Yii :: $ app -> language ) , ] ; if ( $ this -> skipOnEmpty ) { $ options [ 'skipOnEmpty' ] = 1 ; } return $ options ; }
{@inheritdoc}
{