wupengfei 3 years ago
parent
commit
15a04d07b2
1 changed files with 3 additions and 3 deletions
  1. 3 3
      application/admin/validate/User.php

+ 3 - 3
application/admin/validate/User.php

@@ -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 = [])