Hi,
How to use preping functions in set_rules like xss_clean, prep_for_form, prep_url, strip_image_tags and encode_php_tags?
Example:
$crud->set_rules('name', 'Name', 'required | prep_for_form'); does not work.
If i make this:
$crud->set_rules('name', 'Name', 'required | callback_prep_for_form');
function callback_prep_for_form ($string) {
$string = $this->form_validation->prep_for_form($string);
return $string
}
Is correct?