Validation and beforeInsert - 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: Validation and beforeInsert (/showthread.php?tid=78977) |
Validation and beforeInsert - Codinglander - 04-03-2021 Hello there. What is the order in which a model works? Is the validation carried out first and then a possible "beforeInsert" carried out or is it the other way around? I am using CI4 Greetinxx Kighlander RE: Validation and beforeInsert - InsiteFX - 04-03-2021 From looking at the code it looks like the validation is done first then save, insert, update and replace etc; Take a look at system/BaseModel and system/Model |