控制台应用,yzncms本身基于tp5.1框架,里面的队列用不了,bug,坑
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Yzncms [ 御宅男工作室 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2018 http://yzncms.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
  8. // +----------------------------------------------------------------------
  9. // | Author: 御宅男 <530765310@qq.com>
  10. // +----------------------------------------------------------------------
  11. // +----------------------------------------------------------------------
  12. // | 模型验证
  13. // +----------------------------------------------------------------------
  14. namespace app\admin\validate\member;
  15. use think\Validate;
  16. class Member extends Validate
  17. {
  18. //定义验证规则
  19. protected $rule = [
  20. 'username|用户名' => 'unique:member|require|alphaDash|length:3,20',
  21. 'nickname|昵称' => 'unique:member|length:3,20',
  22. 'password|密码' => 'require|length:3,20',
  23. 'email|邮箱' => 'unique:member|require|email',
  24. 'groupid|会员组' => 'require|number',
  25. ];
  26. public function sceneEdit()
  27. {
  28. return $this->remove('password', 'require');
  29. }
  30. public function sceneRegister()
  31. {
  32. return $this->remove('groupid', 'require');
  33. }
  34. }