widgets/emailCaptcha/EmailCaptchaValidator.php
public function validateAttribute($model, $attribute)
    {
        $value = $model->$attribute;
        $captcha = $this->createCaptchaAction($model);
        $valid = !is_array($value) && $captcha->validate($value);
        $isExpired = $captcha->isExpired();

        $result = $isExpired ? [$this->getMessageForExpiredCaptcha(), []] : ($valid ? null : [$this->message, []]);
//        $result = $this->validateValue($model->$attribute, $model);
        if (!empty($result)) {
            $this->addError($model, $attribute, $result[0], $result[1]);
        }
    }
public function validateAttribute($model, $attribute)
    {
        $value = $model->$attribute;
        $captcha = $this->createCaptchaAction($model);
        $valid = !is_array($value) && $captcha->validate($value);
        $isExpired = $captcha->isExpired();

        $result = $isExpired ? [$this->getMessageForExpiredCaptcha(), []] : ($valid ? null : [$this->message, []]);
//        $result = $this->validateValue($model->$attribute, $model);
        if (!empty($result)) {
            $this->addError($model, $attribute, $result[0], $result[1]);
        }
    }
public function validateAttribute ( $ model , $ attribute ) { $ value = $ model -> $ attribute ; $ captcha = $ this -> createCaptchaAction ( $ model ) ; $ valid = ! is_array ( $ value ) && $ captcha -> validate ( $ value ) ; $ isExpired = $ captcha -> isExpired ( ) ; $ result = $ isExpired ? [ $ this -> getMessageForExpiredCaptcha ( ) , [ ] ] : ( $ valid ? null : [ $ this -> message , [ ] ] ) ; //        $result = $this->validateValue($model->$attribute, $model); if ( ! empty ( $ result ) ) { $ this -> addError ( $ model , $ attribute , $ result [ 0 ] , $ result [ 1 ] ) ; } }
Validates a single attribute.
Child classes must implement this method to provide the actual validation logic.
@param \yii\base\Model $model the data model to be validated
@param string $attribute the name of the attribute to be validated.
Validates a single attribute . Child classes must implement this method to provide the actual validation logic .