-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
验证器unique复杂条件验证的问题 #2577
Comments
@liu21st 使用 framework/src/think/Validate.php Lines 1129 to 1183 in 6f1c01f
测试代码: <?php
namespace app\validate;
use think\Validate;
class Test extends Validate
{
protected $rule = [
'district_id|所属区域' => 'require',
'name' => 'unique:system_community,district_id=1&name=2'
];
} <?php
namespace app\controller;
use app\BaseController;
use app\validate\Test;
class Index extends BaseController
{
public function index()
{
$validate = validate(Test::class)->check([
'district_id' => '1',
'name' => 'zs',
]);
dump($validate);
}
} |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
根据下图手册的写法,会报错
not support data:district_id=1
,是本菜使用姿势不对,还是bug了?The text was updated successfully, but these errors were encountered: