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

[eluser]jamesf[/eluser]
Just a quick question, couldn't seem to find anything about it when I searched...

Is there a way of passing variables to your custom validation callbacks e.g.

Code:
$rules['username'] = "callback__valid_username($user_id)";

The project I'm working on allows 'admins' to create and edit 'users', when adding a new user I've created a function that will check the database for a duplicate username and this is working ok.

The problem comes when I'm editing a 'user', I need to do a check on the username whilst knowing the id of the user in question.

Regards,

James


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