Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We need it outside model if we'd like to run validation rules which are connecting to database OUTSIDE our model. ``` if($this->request->getPost('p')) { $post = $this->request->getPost('p'); $user_model = (new \UserModel()); $validation = \Config\Services::validation(); $validation->setRules($user_model->getValidationRules())->run($data, null, $user_model->DBGroup); d($validation->getErrors(),$this->request->getPost());die(); } ```
- Loading branch information