public function addRules(array $validators)
{
foreach ($validators as $key => $spec) {
if ($spec instanceof Validatable) {
$this->appendRule($spec);
} elseif (is_numeric($key) && is_array($spec)) {
$this->addRules($spec);
} elseif (is_array($spec)) {
$this->addRule($key, $spec);
} else {
$this->addRule($spec);
}
}
return $this;
}