Welcome Guest, Not a member yet? Register   Sign In
Validation question
#3

[eluser]chobo[/eluser]
In the documentation it says you can use functions to prepare data when you set the validation rules like: trim, htmlspecialchar, etc... I wasn't sure if I could somehow access those values because if I prepare the values in the validation rules and then after call post to retrieve them I don't see how those values will still be prepared.

Maybe an example will explain this better.

The following does a validation check and preps the data using htmlspecialchars
Code:
// validate and prep data
$rules['name'] = "required|htmlspecialchar";

If I then call post on the field to retrieve it
Code:
$this->input->post('name');

Will it have the htmlspecialchars applied to it? If not, how would I get the version that does? I'm a little confused by the documentation as it uses the word "prep", so I'm assuming I can access the prepped version of the data.


Messages In This Thread
Validation question - by El Forum - 08-09-2007, 12:38 PM
Validation question - by El Forum - 08-09-2007, 01:03 PM
Validation question - by El Forum - 08-09-2007, 03:52 PM
Validation question - by El Forum - 08-09-2007, 04:56 PM
Validation question - by El Forum - 08-09-2007, 05:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB