mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
修正单元测试
This commit is contained in:
@@ -89,13 +89,11 @@ class Validate
|
||||
* @access public
|
||||
* @param array $rules 验证规则
|
||||
* @param array $message 验证提示信息
|
||||
* @param array $config 验证参数
|
||||
*/
|
||||
public function __construct(array $rules = [], $message = [], $config = [])
|
||||
public function __construct(array $rules = [], $message = [])
|
||||
{
|
||||
$this->rule = array_merge($this->rule, $rules);
|
||||
$this->message = array_merge($this->message, $message);
|
||||
$this->config = array_merge($this->config, $config);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -182,23 +180,6 @@ class Validate
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 传入验证参数
|
||||
* @access public
|
||||
* @param string|array $name 参数名或者数组
|
||||
* @param mixed $value 参数值
|
||||
* @return Validate
|
||||
*/
|
||||
public function config($name, $value = null)
|
||||
{
|
||||
if (is_array($name)) {
|
||||
$this->config = array_merge($this->config, $name);
|
||||
} else {
|
||||
$this->config[$name] = $value;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置验证场景
|
||||
* @access public
|
||||
|
||||
Reference in New Issue
Block a user