[Problem] Form helper in Codeigniter v3.0rc |
Hi have anyone use Form Helper in Codeigniter v3.0rc.
I have a problem about it. When My Controller receive $_POST data, PHP Code: $this->form_validation->run() What's happen? I set rules correctly. And PHP Code: echo validation_errors(); Who can help me.
Yes, I have the same problem after a lot of tests.
If all the input fields are empty : It's okay, all the errors are found And if I fill all fields : The message error is that it nof found the error message, but this message exists in english and in french language. I've also an error with the csrf security, when i activate it in the config file. it's impossible to submit a form :/
Did you have 'xss_clean' included in your validation rules? Read the upgrade instructions.
Yes, I've tried to deactivate it and it was the same result :/
In fact we need to deactivate global_xss_filtering in the config file and load the security helper to applicate it in the form validation rules ? I've tried it and apparently it works. But, when I use the csrf protection (in config file) I have this error when I try to submit a form : The action you have requested is not allowed. PS : Sorry for my bad english :/ (01-30-2015, 08:45 AM)SquallX Wrote: Yes, I've tried to deactivate it and it was the same result :/ If I were you, I'd remove the 'xss_rule', not try to make it work again. It is very much intentional that it's no longer a form validation rule by default. (01-30-2015, 08:45 AM)SquallX Wrote: But, when I use the csrf protection (in config file) I have this error when I try to submit a form : Please read the manual about CSRF protection: http://www.codeigniter.com/userguide3/li...rgery-csrf
Thanks but I've already read the documentation about the csrf protection. My code is like that (I use Twig template) :
PHP Code: $this->data = array_merge($this->data, [ And my users_panel.twig contains between form tags : Code: <div class=" col-sm-offset-2 col-sm-10"> So I don't understant why the access is already refused :/ |
Welcome Guest, Not a member yet? Register Sign In |