![]() |
validation : return formatted rule fields - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: validation : return formatted rule fields (/showthread.php?tid=2761) |
validation : return formatted rule fields - El Forum - 08-23-2007 [eluser]xwero[/eluser] I don't know if it's possible so i want to ask it first. The idea behind it is simple. You have all those rules to validate the input and when the validation succeeds you can use the rules instead of doing the same thing over again with the post variables. In code this would be something like this Code: $this->load->library('validation'); I tested this example but the $this->validation->username returned the post variable. validation : return formatted rule fields - El Forum - 08-23-2007 [eluser]alpar[/eluser] if you didn't put any leading trailing spaces, or anything that gets cut out in the XSS filter that you get the post variable as is, and yo get a false on the run() method if it doesn't match the rules. If i missed your point please let me know ![]() validation : return formatted rule fields - El Forum - 08-23-2007 [eluser]BravoAlpha[/eluser] [quote author="xwero" date="1187875680"]when the validation succeeds you can use the rules instead of doing the same thing over again with the post variables.[/quote] The post variables are modified directly. Edit: Wait, `$this->validation->whatever` should (from what I see) have the same changes applied to it as the $_POST[] variable. Are you saying that it doesn't work for you? |