123456789101112131415161718192021222324252627282930 |
- <?php
- namespace app\wechat\validate;
- use support\Validate;
- class CustomValidate extends Validate
- {
- protected $rule = [
- 'id|ID' => 'require|integer',
- 'mobile|联系电话' => 'require|mobile',
- 'name|客户姓名' => 'require',
- 'gender|客户性别' => 'require',
- 'type|来访方式' => 'require',
- 'current_status|当前状态' => 'require',
- 'check_status|报备状态' => 'require'
- ];
- protected $message = [];
- protected $scene = [
- 'add' => ['mobile', 'type','name', 'gender'],
- 'update' => ['id','type', 'name', 'gender'],
- 'phone' => ['mobile'],
- 'status' => ['id', 'current_status'],
- 'check' => ['id', 'check_status']
- ];
- }
|