Official.php 896 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2017 https://www.sapixx.com All rights reserved.
  4. * @license Licensed (http://www.apache.org/licenses/LICENSE-2.0).
  5. * @author pillar<ltmn@qq.com>
  6. * 公众号菜单管理
  7. */
  8. namespace app\system\validate;
  9. use think\Validate;
  10. class Official extends Validate{
  11. protected $rule = [
  12. 'id' => 'require|number',
  13. 'parent_id' => 'require|number',
  14. 'sort' => 'require|number',
  15. 'name' => 'require',
  16. 'types' => 'require',
  17. ];
  18. protected $message = [
  19. 'id' => 'ID资源',
  20. 'sort' => '排序序号必须填写',
  21. 'name' => '菜单名称必须填写',
  22. 'types' => '链接类型必须填写',
  23. ];
  24. protected $scene = [
  25. 'sort' => ['id','sort'],
  26. 'add' => ['parent_id','name','types'],
  27. 'edit' => ['id','name','types'],
  28. ];
  29. }