public function performAjaxValidation($post=null)
    {
        $request = Yii::$app->getRequest();

        /**
         * @var $this \yii\base\Model
         */
        if ($request->isAjax && $this->load(isset($post) ? $post : $request->post())) {
            $response = Yii::$app->getResponse();
            $response->format = $response::FORMAT_JSON;
            if (is_null($this->_performAjaxValidationResult)){
                $this->_performAjaxValidationResult = ActiveForm::validate($this);
            }
            return $this->_performAjaxValidationResult;
        }
        return null;
    }
public function performAjaxValidation($post=null)
    {
        $request = Yii::$app->getRequest();

        /**
         * @var $this \yii\base\Model
         */
        if ($request->isAjax && $this->load(isset($post) ? $post : $request->post())) {
            $response = Yii::$app->getResponse();
            $response->format = $response::FORMAT_JSON;
            if (is_null($this->_performAjaxValidationResult)){
                $this->_performAjaxValidationResult = ActiveForm::validate($this);
            }
            return $this->_performAjaxValidationResult;
        }
        return null;
    }
public function performAjaxValidation ( $ post = null ) { $ request = Yii :: $ app -> getRequest ( ) ; /**
         * @var $this \yii\base\Model
         */ if ( $ request -> isAjax && $ this -> load ( isset ( $ post ) ? $ post : $ request -> post ( ) ) ) { $ response = Yii :: $ app -> getResponse ( ) ; $ response -> format = $ response :: FORMAT_JSON ; if ( is_null ( $ this -> _performAjaxValidationResult ) ) { $ this -> _performAjaxValidationResult = ActiveForm :: validate ( $ this ) ; } return $ this -> _performAjaxValidationResult ; } return null ; }
Realizes perform ajax validation for related model
@param array|null $post Array of post data from Yii::$app->getRequest()->post()
@return array|mixed|null
Realizes perform ajax validation for related model