Setting rules in a config file not working (bug?) |
[eluser]asumaran[/eluser]
I'm trying to validate my form putting the form validation rules in a file form_validation in /myapp/config/ my form_validation.php file looks like this: Code: $config = array( my controller (myapp/controllers/entrada.php ) Code: function publicar() whith this way nothin happens (or always is valid, the error messages is not displayed), otherwise if I set inline rules en my code, then works my controller file with rules: Code: function publicar() I'm not using routes, _remap,etc. please, help! is a bug? please, sorry for my english :/
[eluser]BrianDHall[/eluser]
I don't use the form validation class anymore really, but to wit: $config = array( ‘/entrada/publicar’ => array( ...should be: $config = array( ’entrada/publicar’ => array( And make sure your controller/function names follow the requirements of the class: http://ellislab.com/codeigniter/user-gui...ngtoconfig
[eluser]asumaran[/eluser]
I've doing something wrong. I thought I should add 'form_validation' in $autoload['config'] = array('form_validation'); when I removed it, it works! |
Welcome Guest, Not a member yet? Register Sign In |