From fd5447fc4f4177e5019fbb96a24a13b500314435 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 5 May 2016 13:17:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Validate=E7=B1=BB=E7=9A=84req?= =?UTF-8?q?uire=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Validate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/Validate.php b/library/think/Validate.php index afbb0799..d6a639c1 100644 --- a/library/think/Validate.php +++ b/library/think/Validate.php @@ -469,7 +469,7 @@ class Validate switch ($rule) { case 'require': // 必须 - $result = !empty($value) && '0' != $value; + $result = !empty($value) || '0' == $value; break; case 'accepted': // 接受