Welcome Guest, Not a member yet? Register   Sign In
Form_validation - checking checkboxes problem. Any help appreciated! (CI 1.7)
#5

[eluser]hugle[/eluser]
Hello.

as for a moment I came with one sollution on how to change an error message for one specific rule.

for example I have a rule :
Code:
$this->form_validation->set_rules('terms', 'terms', 'required');
The error I should get is: 'The terms field is required.'

So now I replace it:
Code:
$data['errors'] = str_replace('The terms field is required.', 'You must accept terms and conditions', validation_errors());

and later in the view file, I echo data['errors'] whitch contains all the validation errors and the "custom" terms error

If anyone has better sollution - please share


Messages In This Thread
Form_validation - checking checkboxes problem. Any help appreciated! (CI 1.7) - by El Forum - 11-22-2008, 07:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB