![]() |
How to use ajax/json with validation ? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: How to use ajax/json with validation ? (/showthread.php?tid=72223) |
How to use ajax/json with validation ? - bvrignaud - 11-23-2018 Hello, I'm actually working on a new project with CI4. It's greats :-) But I have some problems wit ajax request and validation. My view : Code: axios.post({ PHP Code: $this->validation->setRules([ What's wrong ? RE: How to use ajax/json with validation ? - Piotr - 11-23-2018 (11-23-2018, 10:48 AM)bvrignaud Wrote: Hello, Code: $this->return $this->response->setJSON([ // <<<<-------- $this->return $this->response... ?? or return $this->... ?? RE: How to use ajax/json with validation ? - bvrignaud - 11-23-2018 (11-23-2018, 11:13 AM)Piotr Wrote:Sorry, I changed for return $this->... RE: How to use ajax/json with validation ? - titounnes - 11-24-2018 (11-23-2018, 11:54 AM)bvrignaud Wrote:I'm using responseTrait gor json response(11-23-2018, 11:13 AM)Piotr Wrote:Sorry, I changed for return $this->... PHP Code: .... RE: How to use ajax/json with validation ? - bvrignaud - 12-10-2018 Thanks. Sorry for the late, I haven't seen you have post a reply. A had the same solution. Thanks |