Promotionbundling.php 1.3 KB

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