Welcome Guest, Not a member yet? Register   Sign In
Form Validation Config File Suddenly Only Works for Some Rules
#2

[eluser]cideveloper[/eluser]
A couple of things.

1) It does work. I used your code and it works fine with the numeric and greater_than. try this real quick if you want. change 'clientone' in the application/config/form_validation.php to 'add/one' and then change

Code:
$this->form_validation->run('clientone')
to
Code:
$this->form_validation->run()

See if that does anything. Also what version of CI are you using?

2) why are you loading your view in index and then submitting to "one" when $this->form_validation->run('clientone') == FALSE then you should show the view. If it is the first time then you wont have any validation_errors(). When the form is submitted and condition is FALSE again the view is loaded and validation_errors() is available. Basically submitting to itself.


Messages In This Thread
Form Validation Config File Suddenly Only Works for Some Rules - by El Forum - 06-15-2011, 10:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB