Welcome Guest, Not a member yet? Register   Sign In
Validation Class Callback question
#1

[eluser]gedev2006[/eluser]
Hi

Im writing a login module, using the form validation class to a) check username field is filled in ( required ) b) use a callback to check the user exists c) check password is entered d) check password is valid for the user

Is it possible when calling the password callback to actually parse over the username as well as the password string? here is the code i have so far:

Code:
// Set validation rules
            $_rules = array (
                        array ( 'field' => 'username', 'label' => 'Username', 'rules' => 'required|callback_valid_user' ),
                        array ( 'field' => 'password', 'label' => 'Password', 'rules' => 'required|callback_valid_password' )
                        );
                        
            $this->form_validation->set_rules ( $_rules );

see all this is doing for the password is checking its required then calling "valid_password" but its only parsing the password field, and i need it to send over the username as well

thanks


Messages In This Thread
Validation Class Callback question - by El Forum - 10-11-2009, 01:45 AM
Validation Class Callback question - by El Forum - 10-11-2009, 02:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB