if ($data === null
) { $data =
$this->data;
} else { // Store data to validate.
$this->data =
$data;
} // `DBGroup` is a reserved name. For is_unique and is_not_unique
$data['DBGroup'
] =
$dbGroup;
$this->
loadRuleGroup($group);
// If no rules exist, we return false to ensure
// the developer didn't forget to set the rules.
if (empty($this->rules
)) { return false;
} // Replace any placeholders (e.g. {id}) in the rules with
// the value found in $data, if any.
$this->rules =
$this->
fillPlaceholders($this->rules,
$data);