ContractCateCheck.php 591 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2021 勾股工作室
  4. * @license https://opensource.org/licenses/GPL-3.0
  5. * @link https://www.gougucms.com
  6. */
  7. namespace app\admin\validate\contract;
  8. use think\Validate;
  9. class ContractCateCheck extends Validate
  10. {
  11. protected $rule = [
  12. 'title' => 'require|unique:contract_cate',
  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. }