GeoWritingsTaskRequest.php
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/**
* @remark :
* @name :GeoWritingsTaskRequest.php
* @author :lyh
* @method :post
* @time :2025/10/25 14:21
*/
namespace App\Http\Requests\Aside\Geo;
use Illuminate\Foundation\Http\FormRequest;
class GeoWritingsTaskRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'project_id' => 'required',
'keyword' => 'required',
'title' => 'required|max:120',
'command_introduction' => 'required',
'command_main' => 'required'
];
}
public function messages()
{
return [
'project_id.required' => '项目ID未知',
'keyword.required' => '关键词不能为空',
'title.required' => 'GEO文标题不能为空',
'title.max' => 'GEO文标题最多120个字符',
'command_introduction.required' => '生成引言内容命令不能为空',
'command_main.required' => '生成正文内容命令不能为空'
];
}
}