Promotionbundling.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. * ============================================================================
  6. *
  7. * ============================================================================
  8. *
  9. * ----------------------------------------------------------------------------
  10. *
  11. * ============================================================================
  12. * 验证器
  13. */
  14. class Promotionbundling extends Validate
  15. {
  16. protected $rule = [
  17. 'promotion_bundling_price' => 'require|number|egt:0',
  18. 'promotion_bundling_sum' => 'require|number',
  19. 'promotion_bundling_goods_sum' => 'require|number'
  20. ];
  21. protected $message = [
  22. 'promotion_bundling_price.require' => '不能为空,且不小于0的整数',
  23. 'promotion_bundling_price.number' => '不能为空,且不小于0的整数',
  24. 'promotion_bundling_price.egt' => '不能为空,且不小于0的整数',
  25. 'promotion_bundling_sum.require' => '不能为空,且不小于0的整数',
  26. 'promotion_bundling_sum.number' => '不能为空,且不小于0的整数',
  27. 'promotion_bundling_goods_sum.require' => '不能为空,且为1到5之间的整数,包括1和5',
  28. 'promotion_bundling_goods_sum.number' => '不能为空,且为1到5之间的整数,包括1和5'
  29. ];
  30. protected $scene = [
  31. 'bundling_setting' => ['promotion_bundling_price', 'promotion_bundling_sum', 'promotion_bundling_goods_sum'],
  32. ];
  33. }