ProductReplyValidate.php 553 B

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