StoreProductReplyValidate.php 702 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * @package merchant
  4. *
  5. * @author xaboy
  6. * @day 2020/5/30
  7. *
  8. *
  9. */
  10. namespace app\validate\admin;
  11. use think\Validate;
  12. class StoreProductReplyValidate extends Validate
  13. {
  14. protected $failException = true;
  15. protected $rule = [
  16. 'product_id|商品' => 'require|array|min:1',
  17. 'nickname|用户昵称' => 'require|max:20',
  18. 'comment|评论' => 'require|max:128',
  19. 'product_score|商品分数' => 'require|integer|max:5',
  20. 'service_score|服务分数' => 'require|integer|max:5',
  21. 'postage_score|物流分数' => 'require|integer|max:5',
  22. 'avatar|用户头像' => 'require',
  23. 'pics|评价图片' => 'require|array|max:6',
  24. ];
  25. }