Welcome Guest, Not a member yet? Register   Sign In
Validation Rules
#9

[eluser]CroNiX[/eluser]
That would go back to our discussion from yesterday where the error name must match the name of the callback function exactly.

Code:
public function _some_callback($var)
{
  if ($var == 'something')
  {
    //failed, set the error message
    $this->form_validation->set_message('_some_callback', 'This is the error message that will display for _some_callback');
    return FALSE;
  }
  return TRUE; //passed
}

function name is "_some_callback"
error message set for "_some_callback"
If these 2 names don't match exactly, you'll get the error you are because it won't be able to find the error message that goes to that validation rule...


Messages In This Thread
Validation Rules - by El Forum - 07-31-2012, 04:22 PM
Validation Rules - by El Forum - 07-31-2012, 06:44 PM
Validation Rules - by El Forum - 07-31-2012, 06:47 PM
Validation Rules - by El Forum - 07-31-2012, 07:39 PM
Validation Rules - by El Forum - 08-01-2012, 12:54 PM
Validation Rules - by El Forum - 08-01-2012, 01:06 PM
Validation Rules - by El Forum - 08-01-2012, 01:12 PM
Validation Rules - by El Forum - 08-01-2012, 01:18 PM
Validation Rules - by El Forum - 08-01-2012, 01:22 PM
Validation Rules - by El Forum - 08-01-2012, 01:25 PM
Validation Rules - by El Forum - 08-01-2012, 01:29 PM
Validation Rules - by El Forum - 08-01-2012, 01:30 PM
Validation Rules - by El Forum - 08-01-2012, 01:33 PM
Validation Rules - by El Forum - 08-01-2012, 01:37 PM
Validation Rules - by El Forum - 08-01-2012, 01:40 PM
Validation Rules - by El Forum - 08-01-2012, 01:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB