Welcome Guest, Not a member yet? Register   Sign In
Help with validation rule checking for uniqueness
#4

[eluser]Iván Argulo[/eluser]
Maybe it could be done with callbacks.

For example:

Code:
$this->form_validation->set_rules('username', 'Username', 'required|callback_check_user');

function check_user($user) {
// Do all stuff here
}

I remember we did this a few months ago. We use a session to store the current ID of the record, so we tested if the data exists excluding the current record.

Hope it helps you.


Messages In This Thread
Help with validation rule checking for uniqueness - by El Forum - 07-11-2009, 05:07 PM
Help with validation rule checking for uniqueness - by El Forum - 07-12-2009, 12:39 AM
Help with validation rule checking for uniqueness - by El Forum - 07-12-2009, 09:02 AM
Help with validation rule checking for uniqueness - by El Forum - 07-14-2009, 12:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB