• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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