You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
996 B
34 lines
996 B
4 months ago
|
<?php
|
||
|
namespace app\admin\validate;
|
||
|
|
||
|
class ChannelValidate extends AdminBaseValidate
|
||
|
{
|
||
|
protected $rule = [
|
||
|
'page' => 'require|integer',
|
||
|
'limit' => 'require|integer',
|
||
|
'id' =>'require|integer',
|
||
|
'channel' => 'require',
|
||
|
'agent_id' => 'require|integer'
|
||
|
];
|
||
|
|
||
|
protected $message = [
|
||
|
'page.require' => '分页参数无效',
|
||
|
'page.integer' => '分页参数无效',
|
||
|
'limit.require' => '分页参数无效',
|
||
|
'limit.integer' => '分页参数无效',
|
||
|
'id.require' => '主键无效',
|
||
|
'id.alphaNum' => '主键无效',
|
||
|
'agent_id.require' => '代理ID参数缺少',
|
||
|
'agent_id.integer' => '代理ID参数类型错误'
|
||
|
];
|
||
|
|
||
|
|
||
|
protected $scene = [
|
||
|
'list' => ['page','limit'],
|
||
|
'add' => ['channel'],
|
||
|
'edit' => ['id','channel'],
|
||
|
'delete' => ['id'],
|
||
|
'agent_channel_list' => ['page','limit'],
|
||
|
'agent_created_channel' => ['agent_id','channel'],
|
||
|
];
|
||
|
}
|