Welcome Guest, Not a member yet? Register   Sign In
Callback when using form_validation.php $config array
#3

[eluser]Ickes[/eluser]
Thanks for the reply Ivan. I'm not sure I asked my question properly.

What do I need to do to get this to work? I tried just as you stated -> removing the parameter and returned a simple FALSE. Still not working - seems the code doesn't ever check this callback function.
Code:
function in_domain($passed_value)
{
        //the code can only return FALSE
    $this->form_validation->set_message('topic', 'The %s field can not be the word "test"');
    return FALSE;
}

So, restated
#1 - can someone help me to get this callback to run?
#2 - is the callback function supposed to be included in the form_registration.php file or within the controller or somewhere else altogether?

Thanks.

Quote:Note that you can pass only one param, the value of the current field. So you’ll have to write several functions for your tables, or store the name of the table to check in a session, before loading the validation rules, and check for it in the callback.

Also, I'm not sure this is accurate. I have seen a tutorial or two where multiple parameters have been passed. Either way, just want it to work simply and then I can go from there.


Messages In This Thread
Callback when using form_validation.php $config array - by El Forum - 07-14-2009, 01:17 PM
Callback when using form_validation.php $config array - by El Forum - 07-14-2009, 01:23 PM
Callback when using form_validation.php $config array - by El Forum - 07-14-2009, 01:33 PM
Callback when using form_validation.php $config array - by El Forum - 07-14-2009, 01:39 PM
Callback when using form_validation.php $config array - by El Forum - 07-14-2009, 01:51 PM
Callback when using form_validation.php $config array - by El Forum - 07-14-2009, 01:56 PM
Callback when using form_validation.php $config array - by El Forum - 07-14-2009, 01:56 PM
Callback when using form_validation.php $config array - by El Forum - 07-14-2009, 02:13 PM
Callback when using form_validation.php $config array - by El Forum - 07-14-2009, 02:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB