CI4 equivalent of $this->form_validation->set_data($data); |
Hello,
I need to validate a value outside of $_POST data. In CI3 I could easily manually assign data before running validation: PHP Code: $data = array( But it seems this feature is not exist on CI4. How to do this? Thanks.
Hi, you do it like this.
PHP Code: $validation = \Config\Services::validation();
(08-08-2020, 12:09 PM)jreklund Wrote: Hi, you do it like this. It worked, thanks. Reference: https://codeigniter4.github.io/userguide...r-messages Final code: PHP Code: $data = array( |
Welcome Guest, Not a member yet? Register Sign In |