/**
  * @param $model
  * @return array
  */
 protected function ajaxValidate(AdminAuth $model)
 {
     if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) {
         Yii::$app->response->format = Response::FORMAT_JSON;
         return ActiveForm::validate($model);
     }
     return false;
 }