Skip to content

Commit

Permalink
fixed validation
Browse files Browse the repository at this point in the history
  • Loading branch information
simialbi committed Oct 25, 2018
1 parent d65c94f commit e817022
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/validators/VisualCaptchaValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
Expand Down

0 comments on commit e817022

Please sign in to comment.