From 0a34f007533e90d73ddcc1a999c8301ced042126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E5=A8=98?= <30471441@qq.com> Date: Fri, 24 Dec 2021 18:56:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BD=93=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=85=A8=E5=B1=80=E8=A7=84=E5=88=99=E5=91=BD=E5=90=8D=E7=A9=BA?= =?UTF-8?q?=E9=97=B4=E5=89=8D=E7=BC=80=E6=B2=A1=E6=9C=89=E5=8A=A0=E5=B0=BE?= =?UTF-8?q?=E9=83=A8\=E7=9A=84=E6=97=B6=E5=80=99=E5=BC=95=E5=8F=91?= =?UTF-8?q?=E7=9A=84=E8=A7=84=E5=88=99=E4=B8=8D=E5=AD=98=E5=9C=A8=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Support/Storage/ValidateConfig.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Support/Storage/ValidateConfig.php b/src/Support/Storage/ValidateConfig.php index a987f88..d12af0c 100644 --- a/src/Support/Storage/ValidateConfig.php +++ b/src/Support/Storage/ValidateConfig.php @@ -134,7 +134,7 @@ final class ValidateConfig } /** - * Set the custom rules namespace prefix, If more than one exists, they all take effect + * Set the custom rule namespace prefix, If more than one exists, they all take effect * * @link https://v.neww7.com/en/4/Rule.html#pre-processing * @param string $rulesPath Custom rules namespace prefixes @@ -142,6 +142,9 @@ final class ValidateConfig */ public function setRulesPath(string $rulesPath): ValidateConfig { + if ('\\' !== substr($rulesPath, -1)) { + $rulesPath = $rulesPath . '\\'; + } $this->rulesPath[] = $rulesPath; $this->rulesPath = array_unique($this->rulesPath); return $this; -- Gitee