Welcome Guest, Not a member yet? Register   Sign In
Form Validation Help
#1

Sorry if this isn't the correct section to post. I took over the management of a site that uses codeigniter, and the previous account registration page gave the following format for errors when filling out the registration forms for its fields:

     

However, when I try to add more fields to the account registration page, adding new form validation rules as instructed in the codeigniter manual for each respected field in the controller for the page, the format for the errors is as following:

   
which appears above the fields at the top of the page.

I believe this is the expected error message format. I believe there is nothing in the controller that results in the original error messages, and I'd like to have all fields use the same (second) format since I know how to edit it/can control it. So I guess my question is whether there is some hidden location for form validation? I've looked in the imported form_validation library, all associated models/views that are relevant to the controller, and can't seem to find any where to delete the old error format.

If I need to provide more, specific information I can. Thanks for the help in advance.
Reply
#2

@tdnarb,
It would be nice to see the Controller and View.
Reply
#3

Hi,

The result shown in your first image uses this method:
Individual messages

Using form_error('field_name')

The result for the second image uses this one:
All errors at once

Using validation_errors()

It is in your view, both are good it all depends on your preferences.
A good decision is based on knowledge and not on numbers. - Plato

Reply




Theme © iAndrew 2016 - Forum software by © MyBB