Welcome Guest, Not a member yet? Register   Sign In
Validation errors and rules issue
#1

[eluser]Wonder Woman[/eluser]
Hi,

I've recently gotten in to CodeIgniter and I've set up a small form which I need to validate and then pre-populate the form fields with the submitted data.

When the form is submitted the error messages appear and the fields which had data are pre-populated, however the error messages which appear are missing the field names.

At the moment they appear like this:
Code:
The field is required.

And they should appear like this:
Code:
The title field is required.

When I remove the set fields code, exampled:
Code:
$fields['postcode'] = $this->input->post('postcode');
It works fine but it seems this code is overriding the rules, example:
Code:
$rules['postcode'] = "required";

If you could advise me on how to correct this I would be very grateful.

Many thanks.


Messages In This Thread
Validation errors and rules issue - by El Forum - 07-27-2010, 02:47 AM
Validation errors and rules issue - by El Forum - 07-27-2010, 04:44 AM
Validation errors and rules issue - by El Forum - 07-27-2010, 04:55 AM
Validation errors and rules issue - by El Forum - 07-27-2010, 05:50 AM
Validation errors and rules issue - by El Forum - 07-27-2010, 05:57 AM
Validation errors and rules issue - by El Forum - 07-27-2010, 06:08 AM
Validation errors and rules issue - by El Forum - 07-27-2010, 06:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB