| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace App\Http\Requests\OpenWork\Statistics;
- use App\Http\Requests\BaseRequest;
- /**
- * 自定义表单统计校验规则
- * @author 唐远望
- * @date 2025-08-14
- * */
- class CustomFormStatistics extends BaseRequest
- {
- /**
- *
- * @return array
- */
- public function rules()
- {
- // 规则
- return [
- 'corpid' => 'required',
- 'limit' => 'integer',
- 'form_id' => 'required|integer',
- 'id' => 'required|integer',
- ];
- }
- // 场景列表
- protected $scenes = [
- 'overview' => ['corpid','form_id'],
- 'detail' => ['corpid','form_id'],
- 'user_form_list' => ['corpid','form_id'],
- 'user_form_detail' => ['corpid','form_id','id'],
- ];
- /**
- *
- * @return array
- */
- public function messages()
- {
- return [
- 'corpid.required' => '授权方corpid不能为空',
- 'limit.integer' => '每页记录数必须为整数',
- 'form_id.required' => '表单id不能为空',
- 'form_id.integer' => '表单id必须为整数',
- 'id.required' => '记录id不能为空',
- 'id.integer' => '记录id必须为整数',
- ];
- }
- }
|