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.
58 lines
2.0 KiB
58 lines
2.0 KiB
<?php
|
|
|
|
namespace app\admin\validate;
|
|
|
|
class UserValidate extends AdminBaseValidate
|
|
{
|
|
|
|
protected $rule = [
|
|
'page' => 'require|integer',
|
|
'limit' => 'require|integer',
|
|
'start_time' => 'date|dateFormat:Y-m-d H:i:s',
|
|
'end_time' => 'date|dateFormat:Y-m-d H:i:s',
|
|
'phone' => 'alphaNum',
|
|
'user_no' => 'alphaNum',
|
|
'email' => 'email',
|
|
'status' => 'require|in:1,2,3',
|
|
'frozen_recharge' => 'in:1,0',
|
|
'frozen_withdraw' => 'in:1,0',
|
|
'nation'=>'require',
|
|
'password'=>'require',
|
|
'id' =>'require|integer',
|
|
'is_test_user' => 'require|in:1,2',
|
|
];
|
|
|
|
protected $message = [
|
|
'page.require' => '分页参数无效',
|
|
'page.integer' => '分页参数无效',
|
|
'limit.require' => '分页参数无效',
|
|
'limit.integer' => '分页参数无效',
|
|
'user_no.alphaNum' => '用户号无效',
|
|
'start_time.date' => '搜索日期无效',
|
|
'start_time.dateFormat' => '搜索日期无效',
|
|
'end_time.date' => '搜索日期无效',
|
|
'end_time.dateFormat' => '搜索日期无效',
|
|
'phone.alphaNum' => '手机号无效',
|
|
'email.email' => '邮箱无效',
|
|
'id.require' => '主键无效',
|
|
'id.alphaNum' => '主键无效',
|
|
'status.require' => '状态无效',
|
|
'nation.require' => '国家代码无效',
|
|
'password.require' => '登录密码无效',
|
|
'status.in' => '主键无效',
|
|
'type.require' => '类型无效',
|
|
'type.in' => '类型无效',
|
|
'is_test_user.in' => '未选择用户类型',
|
|
];
|
|
|
|
|
|
protected $scene = [
|
|
'index' => ['page','limit','user_no', 'email', 'phone', 'start_time', 'end_time'],
|
|
'status' => ['id','status'],
|
|
'frozen_state' => ['id','frozen_recharge','frozen_withdraw'],
|
|
'change' => ['id','amount'],
|
|
'relation' => ['page','limit','user_no'],
|
|
'add_phone' =>['nation','phone','password'],
|
|
'add_email' =>['email','password'],
|
|
];
|
|
}
|