HotValidate.php
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
namespace app\api\validate;
class HotValidate extends BaseValidate
{
protected $rule = [
'page' => 'require|integer',
'store_id' => 'require',
'store_name' => 'require',
'mobile' => 'require|regex:^1\d{10}$',
'province' => 'require',
'city' => 'require',
'region' => 'require',
'images' => 'require',
'content' => 'require',
'house_ids' => 'require',
'type' => 'require|in:1,2',
'red_package' => 'require',
'number' => 'require',
'deposit_id' => 'require'
];
protected $message = [
'page.integer' =>'页数必须是整数',
'mobile.regex' =>'手机号格式错误'
];
protected $scene = [
'common' => ['page'], // 公共分页验证
'comment_add' => ['store_id','content'], // 留言提交
'store_apply' => ['store_name','province','city','region','name','mobile'], // 开通社区提交
'store_report' => ['content'], // 举报建议提交
'store_edit' => ['store_icon','store_name','mobile','province','city','region','images'], // 店铺信息修改
'store_inform_add' => ['content','images','house_ids','type'], // 发布信息
'red' => ['red_package','number'], // 发布信息红包
'house_new' => ['house_ids'], // 绑定社区
'deposit_order' => ['deposit_id'], // 板币充值提交
'comment_list' => ['store_id','page'], // 留言列表
'get_red_package' => ['store_inform_id'], // 商家信息id
];
}