HireValidate.php
1.7 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
44
45
<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2018 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 小夏 < 449134904@qq.com>
// +----------------------------------------------------------------------
namespace app\portal\validate;
use think\Validate;
class HireValidate extends Validate
{
protected $rule = [
'select_id' => 'require',
'title' => 'require',
'money' => 'require',
'start_time' => 'require',
'end_time' => 'require',
'address' => 'require',
'else' => 'require',
'people' => 'require|number|max:1000',
];
protected $message = [
'select_id.require' => '雇佣事项不为空!',
'title.require' => '雇主名称不能为空!',
'money.require' => '报酬总额不能为空!',
'start_time.require' => '工作开始时间不能为空!',
'end_time.require' => '工作结束时间不能为空!',
'address.require' => '工作地点不能为空!',
'else.require' => '工作要求不能为空!',
'people.require' => '招聘人数不能为空!',
'people.number' => '招聘人数只能为数字!',
'people.max' => '招聘人数不得超过1000人!',
];
protected $scene = [
'adminChange' =>['title','money','start_time','end_time','address','else']
];
}