From f644821230c2d4b6e61148587dad468e5fc27624 Mon Sep 17 00:00:00 2001 From: whwyy Date: Mon, 15 Apr 2024 15:16:42 +0800 Subject: [PATCH] eee --- src/Validator/Validator.php | 3 +++ 1 file changed, 3 insertions(+) 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] = []; }