fix formatting

This commit is contained in:
Antonio Ramirez
2016-12-14 02:50:12 +01:00
parent f3f4b31bb4
commit 3ba01b4674
140 changed files with 512 additions and 523 deletions

View File

@ -1,4 +1,5 @@
<?php
namespace Da\User\Validator;
use Da\User\Contracts\ValidatorInterface;
@ -20,8 +21,8 @@ class AjaxRequestModelValidator implements ValidatorInterface
{
$request = Yii::$app->request;
if($request->getIsAjax() && !$request->getIsPjax()) {
if($this->model->load($request->post())) {
if ($request->getIsAjax() && !$request->getIsPjax()) {
if ($this->model->load($request->post())) {
Yii::$app->response->format = Response::FORMAT_JSON;
echo json_encode(ActiveForm::validate($this->model));
Yii::$app->end();