From 60578e5b8d5bb39252f57951e90f560f2e09f903 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 20 Mar 2016 23:20:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96unique=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E7=9A=84=E6=9F=A5=E8=AF=A2?= 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 7a271296..d031adbc 100644 --- a/library/think/Validate.php +++ b/library/think/Validate.php @@ -561,7 +561,7 @@ class Validate if (isset($except)) { $map[$key] = ['neq', $except]; } - if ($model->where($map)->find()) { + if ($model->where($map)->field($key)->find()) { return false; } return true;