Commit c23353cf authored by clone's avatar clone

bug

parent a530b8fc
<?php
namespace app\index\validate;
use think\Validate;
/**
* Created by PhpStorm.
* User: zhuwei
* Date: 2018/6/13
* Time: 上午11:02
*/
class VerifyValidate extends Validate
{
protected $rule = [
'id' => 'require|number',
'device_id' => 'require',
'agent_id' => 'require|number',
'is_forbidden' => 'require|in:0,1',
'operator_id' => 'require|number',
];
protected $message = [
'id.require' => 'id不能为空',
'device_id.require' => '设备号获取失败,请联系管理员',
'agent_id.require' => '经纪人id不能为空',
'agent_id.number' => '经纪人id必须为数字',
'is_forbidden.require' => '是否绑定字段必填',
'is_forbidden.in' => '是否绑定字段值只能为0或1',
'operator_id.require' => '操作人为必填字段',
......@@ -30,6 +32,6 @@ class VerifyValidate extends Validate
protected $scene = [
'select' => [ 'id' ],
'verifyIsForbidden' => [ 'device_id', 'is_forbidden', 'operator_id','id' ],
'verifyIsForbidden' => [ 'agent_id', 'is_forbidden', 'operator_id', 'id' ],
];
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment