mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进Validate类的is方法,添加data参数的默认值
This commit is contained in:
@@ -1409,7 +1409,7 @@ class Request
|
||||
* 生成请求令牌
|
||||
* @access public
|
||||
* @param string $name 令牌名称
|
||||
* @param string|array $type 令牌生成方法
|
||||
* @param mixed $type 令牌生成方法
|
||||
* @return string
|
||||
*/
|
||||
public function token($name = '__token__', $type = 'md5')
|
||||
|
||||
@@ -480,9 +480,10 @@ class Validate
|
||||
* @access protected
|
||||
* @param mixed $value 字段值
|
||||
* @param string $rule 验证规则
|
||||
* @param array $data 验证数据
|
||||
* @return bool
|
||||
*/
|
||||
protected function is($value, $rule, $data)
|
||||
protected function is($value, $rule, $data = [])
|
||||
{
|
||||
switch ($rule) {
|
||||
case 'require':
|
||||
|
||||
Reference in New Issue
Block a user