StoreProductReplyValidate.php 623 B

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