The only way is to enableAjaxValidation
at client side
Here is doc about it
To enable AJAX validation for a single input field, configure the
enableAjaxValidation property of that field to be true and specify a
unique form id:
use yii\widgets\ActiveForm;
$form = ActiveForm::begin([
'id' => 'registration-form',
]);
echo $form->field($model, 'username', ['enableAjaxValidation' => true]);
// ...
ActiveForm::end();
You also need to prepare the server so that it can handle the AJAX
validation requests. This can be achieved by a code snippet like the
following in the controller actions:
if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {
Yii::$app->response->format = Response::FORMAT_JSON;
return ActiveForm::validate($model);
}