Welcome Guest, Not a member yet? Register   Sign In
User defined error message do not work
#1

[eluser]Zombie1[/eluser]
I'm having some trouble designing my user defined error messages. My 'required' error messages work fine.

Code:
$this->form_validation->set_rules('callback_show_error_message', 'username', 'Username');
$this->form_validation->set_rules('username', 'Username', 'required');
$this->form_validation->set_rules('password', 'Password', 'required');

As you can see the two fields that use 'required' work fine whenever a user leaves a textfield blank an error is displayed.

It's just my own error message that doesn't display. Here's the function:

Code:
function show_error_message()
{
        // Display error message.
        $this->form_validation->set_message('show_error_message', 'Username or password are incorrect');
       return false;
}

If anyone has any ideas then please let me know.


Messages In This Thread
User defined error message do not work - by El Forum - 06-24-2014, 06:52 PM
User defined error message do not work - by El Forum - 06-24-2014, 07:39 PM
User defined error message do not work - by El Forum - 06-25-2014, 12:31 AM
User defined error message do not work - by El Forum - 06-25-2014, 02:15 AM
User defined error message do not work - by El Forum - 06-25-2014, 04:14 AM
User defined error message do not work - by El Forum - 06-25-2014, 07:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB