Vrgroupbuy.php 904 B

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