'required|nonempty', ]; } public function messages(): array { return [ 'user_id.required' => ':attribute参数缺失', 'user_id.nonempty' => ':attribute信息异常', ]; } public function attributes(): array { return [ 'user_id' => '用户', ]; } }