validation failing - not sure why |
[eluser]deco10[/eluser]
I'm following this: http://codeigniter.com/wiki/Simplelogin/ I know its failing at the validation, its not even getting to the login part. I always tries to go to /example4/ which isn't a page, I just put it there so I can see what its doing. The password for my users is 3 characters. Its not a high security thing, just to stop outside users from seeing data we'd prefer they didn't What am I doing wrong here? form code Code: $data['loginform']['submit'] = array( 'name' => 'submit', function that does the login, loads view Code: function login()
[eluser]deco10[/eluser]
On further investigation it looks like its ignoring the rule about allowing 2 character passwords and leaving it at 8 characters, still not sure though.
[eluser]garymardell[/eluser]
The problem you are facing is that you have it so if the validation fails or isn't run (the == false) then you are redirecting the user. I would imagine your not actually ever seeing the form unless you have it displayed on a separate page. You should also use the new form_validation library not the old one. You should have in the Code: if ($this->validation->run() == false)
[eluser]deco10[/eluser]
I think I resolved it, or at least figured it out. I ended up redirecting a few times on the same page, although I thought it was only happening once. I'll post if I continue to have problems, thanks |
Welcome Guest, Not a member yet? Register Sign In |