• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to fix this error?

#7
[eluser]chmod[/eluser]
[quote author="ppopowicz" date="1246906227"]Have you tried passing the sig_key through the callback instead of using it from the input post (see below)? Is your callback in your controller and do you get the same error when you remove the callback function from the validation?

Code:
$this->form_validation->set_rules('sig_key', 'lang:sig_key', 'trim|xss_clean|required|callback_checkSigKey');

function checkSigKey($sig_key)
{
    if ($sig_key !== $this->session->userdata('sig_key'))
    {
        $this->form_validation->set_message('checkSigKey', $this->lang->line('sig_key_invalid'));
        return false;
    }
    else
    {
        return true;
    }
}
[/quote]

I try the above code.but the error is occur.
When I remove one by one of the rules:
Code:
$this->form_validation->set_rules('sig_key', 'lang:sig_key', 'trim|xss_clean|required');

Code:
$this->form_validation->set_rules('sig_key', 'lang:sig_key', 'trim|xss_clean');

the code become success.
the required rules and callback function error.

but if i remove the sig_key. username and password use required rules and callback function, these are ok.

why ?


Messages In This Thread
how to fix this error? - by El Forum - 07-06-2009, 04:08 AM
how to fix this error? - by El Forum - 07-06-2009, 04:28 AM
how to fix this error? - by El Forum - 07-06-2009, 06:32 AM
how to fix this error? - by El Forum - 07-06-2009, 07:12 AM
how to fix this error? - by El Forum - 07-06-2009, 07:35 AM
how to fix this error? - by El Forum - 07-06-2009, 07:50 AM
how to fix this error? - by El Forum - 07-06-2009, 08:27 AM
how to fix this error? - by El Forum - 07-06-2009, 08:49 AM
how to fix this error? - by El Forum - 07-06-2009, 09:03 PM
how to fix this error? - by El Forum - 07-07-2009, 06:55 AM
how to fix this error? - by El Forum - 07-07-2009, 08:38 AM
how to fix this error? - by El Forum - 07-07-2009, 10:28 AM
how to fix this error? - by El Forum - 07-07-2009, 09:14 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.