This commit is contained in:
pwf0112
2016-03-20 11:57:24 +08:00
parent bc5e9897c5
commit 74ec6d3ae7

View File

@@ -60,8 +60,8 @@ class Validate
*/ */
public function __construct(array $rules = [], $message = [], $config = []) public function __construct(array $rules = [], $message = [], $config = [])
{ {
$this->rule = $rules; $this->rule = array_merge($this->rule, $rules);
$this->message = $message; $this->message = array_merge($this->message, $message);
$this->config = array_merge($this->config, $config); $this->config = array_merge($this->config, $config);
if (is_string($this->config['value_validate'])) { if (is_string($this->config['value_validate'])) {
$this->config['value_validate'] = explode(',', $this->config['value_validate']); $this->config['value_validate'] = explode(',', $this->config['value_validate']);