$this->form_validation->set_data($this->Data) not working |
Good night here staff Brazil,
I'm trying to validate an e-mail and password field, that future will come from the global $ _POST, but I'm porenquanto testing the class I am creating. Even I already sending a completed array with the data to validate, validation returns me errors that do not exist. Follows the code of my MODEL (m_login.php): PHP Code: <?php Follows the code of my CONTROLLER (login.php): PHP Code: /** This is what my CONTROLLER (login.php) is displaying on the screen, I realize that even through e-mail and password validation says the fields are empty (the screen print is attached to this post).
Goodnight everyone, when I try to validate some fields that are NOT within $ _POST, I use the method $this->form_validation_>set_data($data);
But even with my filled field, when I validate a field "required" validation library says the fields are empty. After much headbanging, I found a validation library (Validation.php), github, which solved my problem. Follow the link :https://github.com/lumoz/codeigniter-form-validation. PS: This could be noted to be corrected in future updates.
09-10-2016, 05:34 PM
(This post was last modified: 09-10-2016, 05:38 PM by PaulD. Edit Reason: Added PS )
Interested in what you said, I did a quick test using this
PHP Code: $data = array( So am not sure why your validation is not working, as it seems to be working fine. Other tests with valid_email etc. all behaved as expected. PS Thought I should mention this is with CI 3.1.0 |
Welcome Guest, Not a member yet? Register Sign In |