![]() |
My extended form validation class wont work - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: My extended form validation class wont work (/showthread.php?tid=13304) |
My extended form validation class wont work - El Forum - 11-18-2008 [eluser]phpserver[/eluser] I want to check whether an email that has been submitted is already in my database.Here is my contoller:: form.php Code: <?php Here is MY_Validation.php class MY_Validation.php Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); My extended form validation class wont work - El Forum - 11-18-2008 [eluser]Pascal Kriete[/eluser] You're extending validation (deprecated), but you're using form_validation. One of them will need to change. My extended form validation class wont work - El Forum - 11-18-2008 [eluser]xwero[/eluser] Validation and form validation are two different validation classes and you are mixing them up. The controller has form validation code and the class you extended is the validation class. The unique method doesn't need a $CI variable because it's defined in the parent class already. And if you want to call a method from the parent class you can do it with $this-> because of the inheritance. |