06-25-2008, 10:58 AM
[eluser]paynterc[/eluser]
I have a question about form validation in CI.
There is a nice set of form validation fuctions here:
http://ellislab.com/codeigniter/user-gui...ation.html
Among the things you can do with these functions is prep your data for insert using things like "trim" and "xss_clean".
My question is, once you have used trim or xss_clean on your data, what should you actually insert into your table? Do you insert the data from $this->input->post('myfield') or do you insert from $this->validation->myfield? Or could I just insert the $_POST data? Which object actually gets affected by the data prep functions?
I have a question about form validation in CI.
There is a nice set of form validation fuctions here:
http://ellislab.com/codeigniter/user-gui...ation.html
Among the things you can do with these functions is prep your data for insert using things like "trim" and "xss_clean".
My question is, once you have used trim or xss_clean on your data, what should you actually insert into your table? Do you insert the data from $this->input->post('myfield') or do you insert from $this->validation->myfield? Or could I just insert the $_POST data? Which object actually gets affected by the data prep functions?