Vrgroupbuy.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. * ============================================================================
  6. *
  7. * ============================================================================
  8. * 版权所有 2014-2028 浙江惠利玛产业互联网有限公司,并保留所有权利。
  9. * 网站地址: https://www.valimart.net/
  10. * ----------------------------------------------------------------------------
  11. *
  12. * ============================================================================
  13. * 验证器
  14. */
  15. class Vrgroupbuy extends Validate
  16. {
  17. protected $rule = [
  18. 'vrgclass_name'=>'require|length:1,10',
  19. 'vrgclass_sort'=>'require|between:0,255'
  20. ];
  21. protected $message = [
  22. 'vrgclass_name.require'=>'分类名不能为空且只能在1-10之间',
  23. 'vrgclass_name.length'=>'分类名不能为空且只能在1-10之间',
  24. 'vrgclass_sort.require'=>'分类排序不能为空且只能在0-255之间',
  25. 'vrgclass_sort.between'=>'分类排序不能为空且只能在0-255之间'
  26. ];
  27. protected $scene = [
  28. 'class_add' => ['vrgclass_name', 'vrgclass_sort'],
  29. 'class_edit' => ['vrgclass_name', 'vrgclass_sort'],
  30. ];
  31. }