diff --git a/src/validators/VisualCaptchaValidator.php b/src/validators/VisualCaptchaValidator.php index 96f9d2e..0bc9d50 100644 --- a/src/validators/VisualCaptchaValidator.php +++ b/src/validators/VisualCaptchaValidator.php @@ -46,7 +46,8 @@ public function init() */ public function validateAttribute($model, $attribute) { - $result = $this->validateValue($model->$attribute, Html::getInputName($model, $attribute)); + $namespace = Yii::$app->request->getBodyParam('namespace', Html::getInputName($model, $attribute)); + $result = $this->validateValue($model->$attribute, $namespace); if (!empty($result)) { $this->addError($model, $attribute, $result[0], $result[1]); }