Welcome Guest, Not a member yet? Register   Sign In
Passing variables to custom validation callbacks
#4

[eluser]captainbeef[/eluser]
Hi,
I was looking around for advice on exactly the same scenario. So thanks for the advice.

I just thought I'd note that any vars specifically passed into the custom validation function are additional to the variable being validated. So, for validating $username:

Code:
$rules['username'] = "required|callback_check_username[{$id}]";
.
.
function check_username($username, $id){
    
}

cheers


Messages In This Thread
Passing variables to custom validation callbacks - by El Forum - 03-26-2008, 08:40 AM
Passing variables to custom validation callbacks - by El Forum - 03-26-2008, 08:46 AM
Passing variables to custom validation callbacks - by El Forum - 03-26-2008, 08:51 AM
Passing variables to custom validation callbacks - by El Forum - 04-14-2008, 07:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB