codeigniter-base-model
codeigniter-base-model copied to clipboard
using form_validation->set_data, and ..
trafficstars
other than hacking $_POST use native form_validation->set_data($data);
and added 2nd param for function validate(data,parital) to only apply rules for submitted data.
(useful when updating row, as u can update user.middle_name without having to submit all other user table required fields for example).
Thanks!
A couple of things:
- Do you think you could write tests for this?
- I see that you're using array literal bracket syntax on line 821 (
$config=[];). This ties users into using >PHP5.4, for very little benefit.