12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <?php
- namespace addons\qingdongams\validate;
- use think\Validate;
- //l联系人
- class Contacts extends Validate {
- /**
- * 验证规则
- */
- protected $rule = [
- 'create_staff_id' => 'require|number',
- 'owner_staff_id' => 'require|number',
- 'customer_id' => 'require|number',
- 'name' => 'require|max:50',
- 'mobile' => 'max:32',
- 'subname' => 'max:50',
- 'sex' => 'number|between:0,2',
- 'role' => 'max:32',
- 'post' => 'max:32',
- 'birthday' => 'max:32',
- 'email' => 'email|max:32',
- 'telephone' => 'max:32',
- 'wechat' => 'max:32',
- 'qq' => 'max:32',
- 'address' => 'max:64',
- 'address_detail' => 'max:64',
- 'remarks' => 'max:250',
- ];
- /**
- * 提示消息
- */
- protected $message = [];
- /**
- * 字段描述
- */
- protected $field = [
- 'create_staff_id' => '员工',
- 'owner_staff_id' => '员工',
- 'customer_id' => '所属客户',
- 'name' => '联系人名称',
- 'subname' => '助记名称',
- 'mobile' => '手机号',
- 'sex' => '性别',
- 'role' => '角色',
- 'post' => '职务',
- 'birthday' => '生日',
- 'email' => '邮箱',
- 'telephone' => '座机',
- 'wechat' => '微信号',
- 'qq' => 'qq',
- 'address' => '所在地区',
- 'address_detail' => '详细地址',
- 'remarks' => '备注信息',
- ];
- /**
- * 验证场景
- */
- protected $scene = [
- 'create' => [
- 'name',
- 'subname',
- 'mobile',
- 'sex',
- 'role',
- 'post',
- 'birthday',
- 'email',
- 'telephone',
- 'wechat',
- 'qq',
- 'address',
- 'address_detail',
- 'remarks'
- ],
- 'edit' => [
- 'name',
- 'subname',
- 'mobile',
- 'sex',
- 'role',
- 'post',
- 'birthday',
- 'email',
- 'telephone',
- 'wechat',
- 'qq',
- 'address',
- 'address_detail',
- 'remarks'
- ],
- ];
- }
|