From 9514ae2596443e7f7c7eeebff5da6c4e44579771 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sun, 6 Mar 2016 20:21:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/thinkphp/library/think/validateTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/thinkphp/library/think/validateTest.php b/tests/thinkphp/library/think/validateTest.php index cc117d2f..7f184440 100644 --- a/tests/thinkphp/library/think/validateTest.php +++ b/tests/thinkphp/library/think/validateTest.php @@ -43,6 +43,7 @@ class validateTest extends \PHPUnit_Framework_TestCase 'sex' => '0', 'age' => '20', 'code' => '1234', + 'test' => ['a' => 1, 'b' => 2], ]; $validate = [ @@ -64,6 +65,8 @@ class validateTest extends \PHPUnit_Framework_TestCase 'email' => ['validate_email', '邮箱格式错误', 'filter'], 'sex' => ['0,1', '性别只能为为男或女', 'in'], 'age' => ['1,80', '年龄只能在10-80之间', 'between'], + 'test.a' => ['number', 'a必须是数字'], + 'test.b' => ['1,3', '不能是1或者3', 'notin'], '__option__' => [ 'scene' => [ 'add' => 'username,nickname,password,repassword,mobile,email,age,code',