/** * Отправляет json ответ об ошибке на форме * @param $message */ private function _statusError($message) { $result = array('r' => false, 'message' => $message, 'errors' => $this->_form ? $this->_form->validationErrors() : null, 'field' => $this->_form ? $this->_form->validationErrorFields() : null); echo json_encode($result); exit; }