1、更新内核

2、代码格式化
This commit is contained in:
2016-07-21 14:29:32 +08:00
parent 3cc2c38dc7
commit a72ba86faa
20 changed files with 1214 additions and 1083 deletions

View File

@@ -68,6 +68,7 @@ class Validate
'allowIp' => '不允许的IP访问',
'denyIp' => '禁止的IP访问',
'confirm' => ':attribute和字段 :rule 不一致',
'different' => ':attribute和字段 :rule 不能相同',
'egt' => ':attribute必须大于等于 :rule',
'gt' => ':attribute必须大于 :rule',
'elt' => ':attribute必须小于等于 :rule',
@@ -400,6 +401,19 @@ class Validate
return $this->getDataValue($data, $rule) == $value;
}
/**
* 验证是否和某个字段的值是否不同
* @access protected
* @param mixed $value 字段值
* @param mixed $rule 验证规则
* @param array $data 数据
* @return bool
*/
protected function different($value, $rule, $data)
{
return $this->getDataValue($data, $rule) != $value;
}
/**
* 验证是否大于等于某个值
* @access protected