Vrgroupbuy.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. * ============================================================================
  6. *
  7. * ============================================================================
  8. *
  9. * ----------------------------------------------------------------------------
  10. *
  11. * ============================================================================
  12. * 验证器
  13. */
  14. class Vrgroupbuy extends Validate
  15. {
  16. protected $rule = [
  17. 'vrgclass_name' => 'require|length:1,10',
  18. 'vrgclass_sort' => 'require|between:0,255'
  19. ];
  20. protected $message = [
  21. 'vrgclass_name.require' => '分类名不能为空且只能在1-10之间',
  22. 'vrgclass_name.length' => '分类名不能为空且只能在1-10之间',
  23. 'vrgclass_sort.require' => '分类排序不能为空且只能在0-255之间',
  24. 'vrgclass_sort.between' => '分类排序不能为空且只能在0-255之间'
  25. ];
  26. protected $scene = [
  27. 'class_add' => ['vrgclass_name', 'vrgclass_sort'],
  28. 'class_edit' => ['vrgclass_name', 'vrgclass_sort'],
  29. ];
  30. }