Skip to content

Commit

Permalink
gb recaptcha rule fix
Browse files Browse the repository at this point in the history
  • Loading branch information
noumo committed May 17, 2015
1 parent 12ee0db commit 93c9dc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/guestbook/models/Guestbook.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public function rules()
[['name', 'title', 'text'], EscapeValidator::className()],
['email', 'email'],
['title', 'string', 'max' => 128],
['reCaptcha', ReCaptchaValidator::className(), 'when' => function($model){
return $model->scenario == 'send' && Yii::$app->getModule('admin')->activeModules['guestbook']->settings['enableCaptcha'];
['reCaptcha', ReCaptchaValidator::className(), 'on' => 'send', 'when' => function(){
return Yii::$app->getModule('admin')->activeModules['guestbook']->settings['enableCaptcha'];
}],
];
}
Expand Down

0 comments on commit 93c9dc0

Please sign in to comment.