From 74ec6d3ae7a466877612830b6f9ce81cad93921c Mon Sep 17 00:00:00 2001 From: pwf0112 Date: Sun, 20 Mar 2016 11:57:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Validate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/Validate.php b/library/think/Validate.php index 3d11d851..9d6817bb 100644 --- a/library/think/Validate.php +++ b/library/think/Validate.php @@ -60,8 +60,8 @@ class Validate */ public function __construct(array $rules = [], $message = [], $config = []) { - $this->rule = $rules; - $this->message = $message; + $this->rule = array_merge($this->rule, $rules); + $this->message = array_merge($this->message, $message); $this->config = array_merge($this->config, $config); if (is_string($this->config['value_validate'])) { $this->config['value_validate'] = explode(',', $this->config['value_validate']);