12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace app\api\validate\user;
- use think\Validate;
- class Report extends Validate
- {
- /**
- * 验证规则
- */
- protected $rule = [
- 'reportable_id' => 'require',
- 'reportable_type' => 'require',
- 'content' => 'require',
- 'image' => 'require',
- ];
- /**
- * 字段描述
- */
- protected $field = [
- ];
- /**
- * 提示消息
- */
- protected $message = [
- 'reportable_id.require' => '举报对象ID不能为空',
- 'reportable_type.require' => '举报对象类型不能为空',
- 'content.require' => '举报内容不能为空',
- 'image.require' => '请上传举报凭证',
- ];
- public function __construct(array $rules = [], $message = [], $field = [])
- {
- parent::__construct($rules, $message, $field);
- }
- }
|