DepartmentCheck.php 564 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2021 勾股工作室
  4. * @license https://opensource.org/licenses/GPL-2.0
  5. * @link https://www.gougucms.com
  6. */
  7. namespace app\admin\validate;
  8. use think\Validate;
  9. class DepartmentCheck extends Validate
  10. {
  11. protected $rule = [
  12. 'title' => 'require',
  13. 'id' => 'require',
  14. ];
  15. protected $message = [
  16. 'title.require' => '部门名称不能为空',
  17. 'id.require' => '缺少更新条件',
  18. ];
  19. protected $scene = [
  20. 'add' => ['title'],
  21. 'edit' => ['id', 'title'],
  22. ];
  23. }