I Posted one question yesterday regarding custom validation for radio button Textfield Mandatory On Radio Button. I got answer. But, that was not exact answer. But, it solve
@Nana Partykar
As you asked how the ajax validation can be disabled for the captcha i tried this way. But i am not sure if this is the correct way.
I have set to the the form with this settings
'enableAjaxValidation' => true,
'enableClientValidation' => false,
'validateOnSubmit' => false,
and changed the validation on the action to this (i removed my captcha in my case 'verifyCode' from the attributes which should be validated.
if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {
Yii::$app->response->format = 'json';
$validateAttributes = $model->activeAttributes();
$key = array_search('verifyCode', $validateAttributes);
if ($key!==false) {
array_splice($validateAttributes, $key, 1);
}
return \yii\widgets\ActiveForm::validate($model, $validateAttributes);
}