![]() |
Form Validation Problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17) +--- Thread: Form Validation Problem (/showthread.php?tid=882) |
Form Validation Problem - didi01 - 01-25-2015 Hi everyboby, My name is Dieter and I'm from Germany and new in this Forum here. First I want to apologize for my bad english because this is my first post in english. So now to my Problem. I have a Form with some input fields to save it in a Database table. The Name of the Table is gaestebuch. To check the input data I use the Form Validation Library. But when I submit the Form i get two lines with the follwing error Message. Unable to access an error message corresponding to your field name. I have testet the submit without the Form Validation. In this case the data will be sucessful saved in the database. Here is my View: test_view.php PHP Code: <?php This is the Model: Test_model.php PHP Code: <?php And now here is the Controller: Test.php PHP Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); I'm using Ubuntu with an XAMPP installed. The PHP version is 5.5.19 The Mysql Version is 5.6.21 Codeigniter 3 dev. In the autoload.php in the config folder I load the following helpers $autoload['helper'] = array('url','form'); Is the there anybody who can help me? Many thanks in advance. Best regards Dieter RE: Form Validation Problem - Kabouter - 01-25-2015 Maybe a stupid suggestion, but you set the language to German and forgot to download the german language pack? RE: Form Validation Problem - ivantcholakov - 01-25-2015 Check this change: https://github.com/bcit-ci/CodeIgniter/commit/40651ebf5e29fd4a17be2cd338e8d501d41b66b1 RE: Form Validation Problem - rahulb - 01-25-2015 I feel the code is not working because you forgot to auto-load security helper as you are using xss_clean. Try testing the same code by removing the xss_clean from validation rule. RE: Form Validation Problem - didi01 - 01-26-2015 Hi all, the problem is solved. After autoloading the security helper it was possible to save the data in the database. Many thanks again an best Regards Dieter |