ProductReplyValidate.php 624 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * @package merchant
  4. *
  5. * @author xaboy
  6. * @day 2020/6/10
  7. *
  8. *
  9. */
  10. namespace app\validate\api;
  11. use think\Validate;
  12. class ProductReplyValidate extends Validate
  13. {
  14. protected $failException = true;
  15. protected $rule = [
  16. 'comment|评论' => 'require|max:128',
  17. 'product_score|商品分数' => 'require|integer|max:5',
  18. 'service_score|服务分数' => 'require|integer|max:5',
  19. 'postage_score|物流分数' => 'require|integer|max:5',
  20. 'pics|评价图片' => 'array|max:6',
  21. ];
  22. protected $message = [
  23. 'pics.max' => '评价最多上传6张图片'
  24. ];
  25. }