Promotionbooth.php 973 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace app\common\validate;
  3. use think\Validate;
  4. /**
  5. *
  6. *
  7. * ----------------------------------------------------------------------------
  8. *
  9. * 验证器
  10. */
  11. class Promotionbooth extends Validate
  12. {
  13. protected $rule = [
  14. 'promotion_booth_price' => 'require|number|egt:0',
  15. 'promotion_booth_goods_sum' => 'require|number'
  16. ];
  17. protected $message = [
  18. 'promotion_booth_price.require' => '不能为空,且不小于0的整数',
  19. 'promotion_booth_price.number' => '不能为空,且不小于0的整数',
  20. 'promotion_booth_price.egt' => '不能为空,且不小于0的整数',
  21. 'promotion_booth_goods_sum.require' => '不能为空,且不小于1的整数',
  22. 'promotion_booth_goods_sum.number' => '不能为空,且不小于1的整数'
  23. ];
  24. protected $scene = [
  25. 'booth_setting' => ['promotion_booth_price', 'promotion_booth_goods_sum'],
  26. ];
  27. }