Using form_validation with other than POST data - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Using form_validation with other than POST data (/showthread.php?tid=17540) |
Using form_validation with other than POST data - El Forum - 04-07-2009 [eluser]Unknown[/eluser] Hi, I recently needed to perform validation on data that isn't coming from $_POST. This patch allows the data which needs to be validated to be passed to the run() function as an optional second parameter. If it's not supplied, $_POST is used by default. It should be backwards compatible with existing form_validation users. Code: 33d32 Using form_validation with other than POST data - El Forum - 04-08-2009 [eluser]xwero[/eluser] It seems like a clever solution because you can have multiple runs which is very likely if you can validate more than one input source. Thank you for contributing Using form_validation with other than POST data - El Forum - 04-26-2009 [eluser]Unknown[/eluser] This is great! Could you post the entire file so making these changes incrementally isn't necessary? I think I'm just going to override my core lib with this one. |