Form Validation > Extend CI Base |
[eluser]Multisnet[/eluser]
When I tried to extend the Form Validation CI base class I faced a problem that I would like to share with you. Perhaps this could be useful to someone, I lost a few hours trying to solve it. Extending Form_validation CI base class in the usual way won’t work with the rules in a config file.So we need to do this: Code: function MO_Form_validation($rules = array()) I've discussed this topic in another post UPDATED!!
[eluser]heat23[/eluser]
I've also spent several hours trying to extend the CI_Form_validation class without any luck!! I don't want to crash your thread, so I'll post my details in a new one
[eluser]stevezissou[/eluser]
Just glanced at your code, but it seems as if you are calling the wrong parent constructor. If you are trying to extend the class 'CI_Form_validation' it would be... Code: class MO_Form_validation extends CI_Form_validation {
[eluser]Multisnet[/eluser]
Sorry, I did it like you said but I wrote the code wrong here Thanks anyway, I'm going to update it. |
Welcome Guest, Not a member yet? Register Sign In |