Report.php 876 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace app\api\validate\user;
  3. use think\Validate;
  4. class Report extends Validate
  5. {
  6. /**
  7. * 验证规则
  8. */
  9. protected $rule = [
  10. 'reportable_id' => 'require',
  11. 'reportable_type' => 'require',
  12. 'content' => 'require',
  13. 'image' => 'require',
  14. ];
  15. /**
  16. * 字段描述
  17. */
  18. protected $field = [
  19. ];
  20. /**
  21. * 提示消息
  22. */
  23. protected $message = [
  24. 'reportable_id.require' => '举报对象ID不能为空',
  25. 'reportable_type.require' => '举报对象类型不能为空',
  26. 'content.require' => '举报内容不能为空',
  27. 'image.require' => '请上传举报凭证',
  28. ];
  29. public function __construct(array $rules = [], $message = [], $field = [])
  30. {
  31. parent::__construct($rules, $message, $field);
  32. }
  33. }