[eluser]LuckyFella73[/eluser]
As I understand the user guide, you overwrite the error message
of the "max_lenght" rule and therefore get this error.
I think this line:
Code:
$this->form_validation->set_message("max_length","%s max length must be $max2");
Is not meant to define the error message for "field2" but more to define
the error message for the max_length rule in general.
Try to implement this lines in your form to check if your rules are working:
Code:
<?php echo form_error('field1'); ?>
and
Code:
<?php echo form_error('field2'); ?>
Maybe you better display which field has how many max-chars in your form
and set the error message more flexible like "Please notice the max values
for the formfields like displayed next to the title .."
For english is not my native language it's a bit hard to explain what I mean
(as you can see by reading my "flexible text suggestion") but I hope you understand
what I'm trying to say ...