codeigniter-base-model icon indicating copy to clipboard operation
codeigniter-base-model copied to clipboard

using form_validation->set_data, and ..

Open alzalabany opened this issue 11 years ago • 1 comments
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).

alzalabany avatar Jan 30 '14 04:01 alzalabany

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.

jamierumbelow avatar Feb 05 '14 07:02 jamierumbelow