From 4f595f4e653efa265271ea160ef82fbb02b78c89 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 20 Mar 2016 22:59:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=8F=90=E7=A4=BA=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Validate.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/library/think/Validate.php b/library/think/Validate.php index 20373c42..dacc3071 100644 --- a/library/think/Validate.php +++ b/library/think/Validate.php @@ -32,7 +32,7 @@ class Validate // 验证规则默认提示信息 protected $typeMsg = [ - 'require' => '必须填写', + 'require' => '不能为空', 'number' => '必须是数字', 'float' => '必须是浮点数', 'boolean' => '必须是布尔值', @@ -43,10 +43,10 @@ class Validate 'alpha' => '只能是字母', 'alphaNum' => '只能是字母和数字', 'alphaDash' => '只能是字母、数字和下划线_及破折号-', - 'activeUrl' => '必须是有效的域名或者IP', - 'url' => '必须是有效的URL地址', + 'activeUrl' => '不是有效的域名或者IP', + 'url' => '不是有效的URL地址', 'ip' => '不是有效的IP地址', - 'dateFormat' => '不符合日期格式 :rule', + 'dateFormat' => '必须使用日期格式 :rule', 'in' => '必须在 :rule 范围内', 'notIn' => '不能在 :rule 范围内', 'between' => '只能在 :1 - :2 之间', @@ -66,7 +66,9 @@ class Validate 'lt' => '必须小于 :rule', 'eq' => '必须等于 :rule', 'unique' => '必须在 :1 中唯一', + 'regex' => '不符合指定规则', ]; + // 当前验证场景 protected $scene = null;