StoreActivitySeckillValidate.php 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\validate\admin\marketing;
  12. use think\Validate;
  13. class StoreActivitySeckillValidate extends Validate
  14. {
  15. /**
  16. * 定义验证规则
  17. * 格式:'字段名' => ['规则1','规则2'...]
  18. *
  19. * @var array
  20. */
  21. protected $rule = [
  22. 'name|活动名称' => 'require',
  23. 'section_data|活动日期' => 'require',
  24. 'num|活动限购' => 'require|gt:0',
  25. 'once_num|活动单次限购' => 'require|gt:0',
  26. 'time_id|活动场次' => 'require',
  27. 'seckill_ids|活动商品' => 'require',
  28. ];
  29. }