1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- namespace addons\qingdongams\validate;
- use think\Validate;
- class Leads extends Validate {
- /**
- * 验证规则
- */
- protected $rule = [
- 'create_staff_id' => 'require|number',
- 'owner_staff_id' => 'require|number',
- 'name' => 'require|max:50',
- 'sex' => 'between:0,2',
- 'level' => 'number|between:1,5',
- 'telephone' => 'max:32',
- 'mobile' => 'max:32',
- 'industry' => 'max:50',
- 'source' => 'max:50',
- 'follow' => 'max:50',
- 'address' => 'max:50',
- 'address_detail' => 'max:50',
- 'remarks' => 'max:250',
- ];
- /**
- * 提示消息
- */
- protected $message = [];
- /**
- * 字段描述
- */
- protected $field = [
- 'create_staff_id' => '员工',
- 'owner_staff_id' => '员工',
- 'name' => '线索名称',
- 'sex' => '性别',
- 'telephone' => '电话',
- 'mobile' => '手机号',
- 'industry' => '所属行业',
- 'level' => '客户星级',
- 'follow' => '客户状态',
- 'source' => '客户来源',
- 'address' => '所在地区',
- 'address_detail' => '详细地址',
- 'remark' => '备注',
- ];
- /**
- * 验证场景
- */
- protected $scene = [
- 'create' => ['name', 'sex', 'telephone', 'mobile', 'industry', 'level', 'follow', 'source', 'address', 'address_detail', 'remark'],
- 'edit' => [],
- ];
- }
|