控制台应用,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.

Models.php 1.1KB

1234567891011121314151617181920212223242526272829303132
  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\formguide;
  15. use think\Validate;
  16. class Models extends Validate
  17. {
  18. //定义验证规则
  19. protected $rule = [
  20. 'name|表单名称' => 'require|chsDash|max:30|unique:model',
  21. 'tablename|表单键名' => 'require|lower|max:20|alpha|unique:model',
  22. ];
  23. // edit 验证场景定义
  24. public function sceneEdit()
  25. {
  26. return $this->only(['name']);
  27. }
  28. }