From 0555da98879a327e22d72d169495ac1d20198b1b Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 6 Mar 2016 22:53:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E9=94=99=E8=AF=AF=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Validate.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/think/Validate.php b/library/think/Validate.php index 89128f2f..45fd6c5a 100644 --- a/library/think/Validate.php +++ b/library/think/Validate.php @@ -67,7 +67,7 @@ class Validate } elseif (is_string($options['exists_validate'])) { $options['exists_validate'] = explode(',', $options['exists_validate']); } - + self::$error = []; foreach ($rules as $key => $val) { if (is_numeric($key) && is_array($val)) { $key = array_shift($val); @@ -100,6 +100,8 @@ class Validate // 批量验证 if (is_array($result)) { self::$error[] = $result; + } elseif (isset(self::$error[$key])) { + self::$error[$key] .= ',' . $result; } else { self::$error[$key] = $result; }