CI 1.7 - Form Validation Config File rules are lost if there are additional uri segments |
[eluser]JayTee[/eluser]
This isn't really a 'bug' per se, but it cost me 1/2 hour of problem solving: Scenario: http://www.example.com/index.php/control...ion/param1 contains a form that posts to itself using the uri_string() function: Code: <form action="http://www.example.com/index.php/controller/function/param1"> but your application/config/form_validation.php file shows the rule like this: Code: $config = array( In this scenario, the validation class will not find the validation rule - because it's looking for a rule called 'controller/function/param1'! I changed the form so that it posts to the controller's function directly rather than cheating and using the uri segments in lieu of hidden form fields. I'm sure this is by design; it can also be a 'gotcha' if a user happens to be posting a form to a URL that contains additional uri segments. |
Messages In This Thread |
CI 1.7 - Form Validation Config File rules are lost if there are additional uri segments - by El Forum - 11-17-2008, 10:13 PM
CI 1.7 - Form Validation Config File rules are lost if there are additional uri segments - by El Forum - 11-19-2008, 06:47 AM
CI 1.7 - Form Validation Config File rules are lost if there are additional uri segments - by El Forum - 11-19-2008, 09:46 AM
|