From a449e236fac977666a8bab73a9d7c088c9471a65 Mon Sep 17 00:00:00 2001 From: lw78665806 <78665806@qq.com> Date: Tue, 18 Oct 2016 10:08:55 +0800 Subject: [PATCH] Update Validate.php 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 3c6e847a..ff7c9314 100644 --- a/library/think/Validate.php +++ b/library/think/Validate.php @@ -377,7 +377,7 @@ class Validate // 验证失败 返回错误信息 if (isset($msg[$i])) { $message = $msg[$i]; - if (is_string($message) && strpos($message, '{%')) { + if (is_string($message) && strpos($message, '{%') !== false) { $message = Lang::get(substr($message, 2, -1)); } } else {