Welcome Guest, Not a member yet? Register   Sign In
Issue - Form_Validation > Setting Error Messages > set_rule()

(This post was last modified: 02-25-2019, 05:50 AM by Porto.)

(02-20-2019, 10:39 AM)xenomorph1030 Wrote: What version of CodeIgniter are you running? I tried out your rule and I see the custom message in 3.1.10.

For the heck of it, have you tried overriding the whole form_validation with
PHP Code:
$this->form_validation->set_message('required''Test message.'); 
or something similar? Just for testing purposes of course. Dependent on that result, it helps steer you in the right direction with what might be the issue.

I'm sorry, i'm trying again, and again and again and i don't get the message running!

Another way to do the message to run is like that:

PHP Code:
$this->form_validation->set_rules('name''Name''trim|required|min_length[3]|max_length[40]', ['min_length' => 'O campo Nome deve ter pelo menos 3 caracteres de comprimento.']); 

But really, i still have difficulties to see what's going wrong with this message or what is missing in my configuration.

PHP Code:
$this->form_validation->set_rules('name''Name''trim|required|min_length[3]|max_length[100]', array('required' => 'O campo Título deve ter minimo 5 caracteres.')); 

And yes, i use as the documentation says the set_message() in a condition IF

PHP Code:
$this->form_validation->set_message('rule''Error Message'); 

What should i try again please? Thank you!

Messages In This Thread
RE: Issue - Form_Validation > Setting Error Messages > set_rule() - by Porto - 02-25-2019, 05:49 AM

Theme © iAndrew 2016 - Forum software by © MyBB