|
@@ -10,12 +10,12 @@ class User extends Validate
|
|
|
* 验证规则
|
|
|
*/
|
|
|
protected $rule = [
|
|
|
- 'username' => 'require|regex:\w{3,32}|unique:user',
|
|
|
+ /* 'username' => 'require|regex:\w{3,32}|unique:user',
|
|
|
'nickname' => 'require|unique:user',
|
|
|
'password' => 'regex:\S{6,32}',
|
|
|
'email' => 'require|email|unique:user',
|
|
|
'mobile' => 'unique:user',
|
|
|
- 'level' => 'require|number|between:0,6'
|
|
|
+ 'level' => 'require|number|between:0,6'*/
|
|
|
];
|
|
|
|
|
|
/**
|
|
@@ -35,7 +35,7 @@ class User extends Validate
|
|
|
*/
|
|
|
protected $scene = [
|
|
|
'add' => [],
|
|
|
- 'edit' => ['username', 'nickname', 'password', 'email', 'mobile','level'],
|
|
|
+ 'edit' => ['level'],
|
|
|
];
|
|
|
|
|
|
public function __construct(array $rules = [], $message = [], $field = [])
|