Cannot get my custom Validation to work - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Cannot get my custom Validation to work (/showthread.php?tid=41454) |
Cannot get my custom Validation to work - El Forum - 05-08-2011 [eluser]boltsabre[/eluser] Hi guys, I've got a custom funciton I want to use for my validation, it's just a basic 'bad word' checker. So I extended to parent CI_Form_validation class, but I'm getting an error message when I load the form. It was working fine until I extended the class, so I know the problem is there somewhere any help would be great! My controller function for loading the validation rules: Code: ... My extension of the CI_Form_validation class (saved under /application/libraries/MY_Form_validation.php): Code: class MY_Form_validation extends CI_Form_validation { And the error message I'm now getting when I navigate to the page with the form is: A PHP Error was encountered Severity: Notice Message: Undefined property: MY_Form_validation::$form_validation Filename: libraries/MY_Form_validation.php Line Number: 23 Fatal error: Call to a member function set_message() on a non-object in C:\xampplite\htdocs\www.workandtravelaustralia.com\thisone\application\libraries\MY_Form_validation.php on line 23 Any help would be great, thanks guys!!! |