Fatal error: Call to a member function set_message() on a non-object in... |
[eluser]Noisy[/eluser]
I'm using the Form Validation class with some callback functions. To be exact 4 fields with callback functions and 3 of them give me the error. At first I use Code: 'rules' => 'trim|required|xss_clean|valid_email|callback_email_check' Code: function email_check($mail) The second rule Code: 'rules' => 'trim|required|xss_clean|callback_check_anrede' Code: function check_anrede($param) I really don't know why I get this messages. To me both functions like exactly the same in their structure.
[eluser]ivaylok[/eluser]
[quote author="Noisy" date="1276992625"]I'm using the Form Validation class ... Code: $this->validation->set_message('email_cheack', 'Diese eMail-Adresse ist bereits bei uns registriert.'); Try changing the above code with: Code: $this->form_validation->set_message('email_cheack', 'Diese eMail-Adresse ist bereits bei uns registriert.'); Do the same with the other error messages.
[eluser]Noisy[/eluser]
Ok, I noticed this as well and changed it. The result was disillusioning. I don't get any PHP error, but now I get Quote:Unable to access an error message corresponding to your field name.So the message can't be set, but why? Even though the field is correctly filled, so that shouldn't be any error message displayed.
[eluser]ivaylok[/eluser]
Take a look here: Form Validation : CodeIgniter User Guide. It is quite neatly explained, I'm sure you will be fine. |
Welcome Guest, Not a member yet? Register Sign In |