mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 23:52:49 +08:00
改进
This commit is contained in:
@@ -27,7 +27,7 @@ class Validate
|
|||||||
];
|
];
|
||||||
|
|
||||||
// 验证失败错误信息
|
// 验证失败错误信息
|
||||||
protected static $error = [];
|
protected static $error = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置正则验证规则
|
* 设置正则验证规则
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 模型类测试
|
* Validate类测试
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace tests\thinkphp\library\think;
|
namespace tests\thinkphp\library\think;
|
||||||
@@ -119,7 +119,6 @@ class validateTest extends \PHPUnit_Framework_TestCase
|
|||||||
'password' => ['md5', 'callback'],
|
'password' => ['md5', 'callback'],
|
||||||
'nickname' => [[ & $this, 'fillName'], 'callback', 'cn_'],
|
'nickname' => [[ & $this, 'fillName'], 'callback', 'cn_'],
|
||||||
'phone' => function ($value, $data) {
|
'phone' => function ($value, $data) {
|
||||||
echo $value;
|
|
||||||
return trim($value);
|
return trim($value);
|
||||||
},
|
},
|
||||||
'ab' => ['a,b', 'serialize'],
|
'ab' => ['a,b', 'serialize'],
|
||||||
|
|||||||
Reference in New Issue
Block a user