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

123456789101112131415161718192021222324252627
  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\cms;
  15. use think\Validate;
  16. class Models extends Validate
  17. {
  18. //定义验证规则
  19. protected $rule = [
  20. 'name|模型名称' => 'require|chs|max:30|unique:model',
  21. 'tablename|表键名' => 'require|max:20|unique:model|regex:[a-z][a-z\_]+',
  22. 'type|模型类型' => 'in:1,2',
  23. ];
  24. }