form_validation and the template parser |
[eluser]JCianflone[/eluser]
Hi everyone, Does anyone know of any issues/conflicts with the template parser and using the validation library? I know the validation library is working correctly, but it's not displaying the errors. Every example is using $this->load->view(); but I am using the parser not the view. So, that may be the issue. I haven't seen anything on Google or in the forums. Thanks FYI: I am using 1.7.1
[eluser]JCianflone[/eluser]
Ok, something is really wrong, but I don't know what here is my function Code: public function contact() { when I try to load the library IN this function, the only place it's being used, I get an error. When I move it out to the constructor, no error. It still doesn't work, but I don't get an error. Am I doing something wrong here? form and url are being loaded in the autoload file
[eluser]JCianflone[/eluser]
My error message... Code: A PHP Error was encountered
[eluser]TheFuzzy0ne[/eluser]
What's at line 43? Does your controller extend the Controller class, and does your constructor (if you have one) call the parent class constructor? I'd expect to see that error if I hadn't loaded the form_validation class, which I can see you have done.
[eluser]JCianflone[/eluser]
My constructor is calling the parent class constructor, and line 43 is this line: Code: $this->form_validation->set_rules('txt_name', 'Name', 'required'); ...that's the really confusing part to me here. I'd expect this error IF my validation class wasn't initialized, but it is, as far as I can tell.
[eluser]JCianflone[/eluser]
ah, I just found this thread: http://ellislab.com/forums/viewthread/110848/ Apparently, there may be an issue in PHP 5.2.6 under OSX. I'll have to try updating this tonight and see if that solves my issues.
[eluser]TheFuzzy0ne[/eluser]
What happens when you load the library in the constructor, or set it to load automatically. I know that loading it automatically is not a permanent solution, but it might help us figure out what's going on. |
Welcome Guest, Not a member yet? Register Sign In |