123456789101112131415161718192021222324252627 |
- <?php
- namespace app\admin\validate\sys_manage;
- use support\Validate;
- class UserValidate extends Validate
- {
- protected $rule = [
- 'join_user_role_id' => 'integer',
- 'join_user_dept_id' => 'integer',
- 'user_status|状态' => 'require|in:ACTIVED,DISABLED,PENDING',
- 'user_category|分类' => 'require|in:EMPLOY,OTHER',
- 'user_name|姓名' => 'require',
- 'user_login_name|登录名' => 'require|alphaDash',
- 'user_login_pass|登录密码' => 'require',
- 'user_mobile|联系电话' => 'mobile'
- ];
- protected $message = [];
- protected $scene = [
- 'add' => ['join_user_role_id','join_user_dept_id','user_status','user_category','user_name','user_login_name','user_login_pass','user_login_bcrypt','user_mobile'],
- 'update' => ['join_user_role_id','join_user_dept_id','user_status','user_category','user_name'],
- 'update_status' => ['user_status'],
- ];
- }
|