StoreService.php 696 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. *
  6. *
  7. * ----------------------------------------------------------------------------
  8. *
  9. * 验证器
  10. */
  11. class StoreService extends Validate
  12. {
  13. protected $rule = [
  14. 'store_service_sort' => 'number',
  15. 'store_service_title' => 'require',
  16. ];
  17. protected $message = [
  18. 'store_service_sort.number' => '排序只能为数字',
  19. 'store_service_title.require' => '标题名称不能为空',
  20. ];
  21. protected $scene = [
  22. 'add' => ['store_service_sort', 'store_service_title'],
  23. 'edit' => ['store_service_sort', 'store_service_title'],
  24. ];
  25. }