Welcome Guest, Not a member yet? Register   Sign In
Bug in validation library
#6

[eluser]onejaguar[/eluser]
"prep_for_form" is indeed redundant; it will automatically be run on all fields if a validation error occurs and will not be run in there are no errors, even if explicitly told to run in the rules.

The "form_prep" helper function will do what you want; running in all cases. e.g.:
Code:
$this->load->helper('form');
$rules['data'] = 'trim|xss_clean|form_prep|max_length[255]|required';

Rather than changing functionality, the user manual should be updated to remove “prep_for_form” as an option in the validation rules and it should state that if there are errors, special characters are converted so that HTML data can be shown in a form field without breaking it.


Messages In This Thread
Bug in validation library - by El Forum - 08-10-2008, 10:34 PM
Bug in validation library - by El Forum - 08-11-2008, 05:23 AM
Bug in validation library - by El Forum - 08-11-2008, 07:40 AM
Bug in validation library - by El Forum - 08-11-2008, 11:01 PM
Bug in validation library - by El Forum - 08-24-2008, 11:18 PM
Bug in validation library - by El Forum - 09-24-2008, 04:58 PM
Bug in validation library - by El Forum - 09-24-2008, 07:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB