![]() |
Own validation rules with CodeIgniter >4.5 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Best Practices (https://forum.codeigniter.com/forumdisplay.php?fid=12) +--- Thread: Own validation rules with CodeIgniter >4.5 (/showthread.php?tid=92432) Pages:
1
2
|
RE: Own validation rules with CodeIgniter >4.5 - grimpirate - 02-08-2025 ozornick Wrote:I would like to remind you that some people don't use anything: neither groups nor classes. They create them in controllersYes and as I said, CodeIgniter gives you that freedom. This forum is for best practices and that's what the OP asked. What you consider a best practice may differ. ozornick Wrote:You are wrong about $this‐>validator, the object will appear only after validation, so you can’t work with it before that.You're absolutely right about that, the could should be: PHP Code: if($this->validateData($data, 'newsletter')) |