yii\captcha\CaptchaValidator::init PHP Method

init() public method

public init ( )
    public function init()
    {
        parent::init();
        if ($this->message === null) {
            $this->message = Yii::t('yii', 'The verification code is incorrect.');
        }
    }

Usage Example

 /**
  * @inheritdoc
  */
 public function init()
 {
     $this->captchaAction = Yii::getAlias('@captchaRoute');
     parent::init();
 }