UserAuthCreateRequest.php
1.15 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
<?php
namespace App\Http\Container\AppSection\Requests;
use Hikoon\LaravelApi\Support\ApiRequest;
class UserAuthCreateRequest extends ApiRequest
{
public function rules(): array
{
return [
'nick_name' => 'required|string',
'platform' => 'required|array',
'works' => 'required|string',
'img' => 'array',
'tags' => 'required|array',
'audio_info' => 'array',
];
}
public function messages(): array
{
return [
'nick_name.required' => 'nick_name为必填项。',
'nick_name.string' => 'nick_name字符串类型',
'platform.required' => 'platform为必填项。',
'platform.array' => 'platform数组类型',
'works.required' => 'works为必填项。',
'works.string' => 'works字符串类型',
'img.array' => 'img数组类型',
'tags.required' => 'tags为必填项。',
'tags.array' => 'tags数组类型',
'audio_info.array' => 'audio_info为数组类型',
];
}
}