StoreDiscountsValidate.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2022 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\merchant;
  12. use think\Exception;
  13. use think\File;
  14. use think\Validate;
  15. class StoreDiscountsValidate extends Validate
  16. {
  17. protected $failException = true;
  18. protected $rule = [
  19. //"image|套餐图片" => 'require|max:128',
  20. "title|套餐标题" => 'require|max:128',
  21. "type|套餐类型" => 'require|in:0,1',
  22. "is_limit|是否限够" => 'require',
  23. "limit_num|限购数量" => 'require|max:4',
  24. "is_time|是否限时" => "in:0,1",
  25. "sort|排序" => "require",
  26. "free_shipping|是否包邮" => "require",
  27. 'status|发货方式' => 'require',
  28. 'products|发货方式' => 'require',
  29. ];
  30. }