[eluser]mjijackson[/eluser]
The full function is too large to post in this forum. Instead, I'll post the relevant portion. This is starting on line 206 of system/libraries/Validation.php:
Code:
/*
* Are we dealing with an "isset" rule?
*
* Before going further, we'll see if one of the rules
* is to check whether the item is set (typically this
* applies only to checkboxes). If so, we'll
* test for it here since there's not reason to go
* further
*/
if ( ! isset($_POST[$field]))
{
if (in_array('isset', $ex, TRUE) OR in_array('required', $ex))
{
if ( ! isset($this->_error_messages['isset']))
{
if (FALSE === ($line = $this->CI->lang->line('isset')))
{
$line = 'The field was not set';
}
}
else
{
$line = $this->_error_messages['isset'];
}
// Build the error message
$field = ( ! isset($this->_fields[$field])) ? $field : $this->_fields[$field];
$message = sprintf($line, $field);
// Set the error variable. Example: $this->username_error
$error = $field.'_error';
$this->$error = $this->_error_prefix.$message.$this->_error_suffix;
// Add the error to the error array
$this->_error_array[] = $message;
}
continue;
}
The above post is also correct.