[eluser]xwero[/eluser]
I never given it much though but the only thing the set_rules method does is copy the array you defined in the controller/model/library to a validation internal array. This means the method only wastes resources or am i missing something?
set_rules code
Code:
function set_rules($data, $rules = '')
{
if ( ! is_array($data))
{
if ($rules == '')
return;
$data[$data] = $rules;
}
foreach ($data as $key => $val)
{
$this->_rules[$key] = $val;
}
}
It may not be a big waste but in the meanwhile there are no parameters for the run method which is the method that uses the rules.