diff --git a/src/Validator/Validator.php b/src/Validator/Validator.php index f189211..c9706c8 100644 --- a/src/Validator/Validator.php +++ b/src/Validator/Validator.php @@ -91,6 +91,9 @@ class Validator */ public function addRule(string $name, array $rule): void { + if (count($rule) < 1) { + return; + } if (!isset($this->rules[$name])) { $this->rules[$name] = []; }