File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
laravel/app/Http/Requests/User Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ public function authorize()
24
24
public function rules ()
25
25
{
26
26
return [
27
- 'name ' => 'required|between:5 ,80 ' ,
28
- 'email ' => 'email|max:255 ' ,
27
+ 'name ' => 'required|between:3 ,80 ' ,
28
+ 'email ' => 'nullable| email|max:255 ' ,
29
29
'password ' => 'required|between:5,80 ' ,
30
30
];
31
31
}
@@ -39,11 +39,11 @@ public function messages()
39
39
{
40
40
return [
41
41
'name.required ' => '名称不能为空 ' ,
42
- 'name.between ' => '名称输入有误 ' ,
42
+ 'name.between ' => '名称输入长度3-80位 ' ,
43
43
'email.email ' => '邮箱格式有误 ' ,
44
44
'email.max ' => 'cid 输入有误 ' ,
45
45
'password.required ' => '密码不能为空 ' ,
46
- 'password.between ' => '密码输入有误 ' ,
46
+ 'password.between ' => '密码输入长度5-80位 ' ,
47
47
];
48
48
}
49
49
}
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ public function authorize()
24
24
public function rules ()
25
25
{
26
26
return [
27
- 'name ' => 'required|between:5 ,80 ' ,
28
- 'email ' => 'email|max:255 ' ,
27
+ 'name ' => 'required|between:3 ,80 ' ,
28
+ 'email ' => 'nullable| email|max:255 ' ,
29
29
'password ' => 'max:80 ' ,
30
30
];
31
31
}
@@ -39,10 +39,10 @@ public function messages()
39
39
{
40
40
return [
41
41
'name.required ' => '名称不能为空 ' ,
42
- 'name.between ' => '名称输入有误 ' ,
42
+ 'name.between ' => '名称输入长度3-80位 ' ,
43
43
'email.email ' => '邮箱格式有误 ' ,
44
44
'email.max ' => 'cid 输入有误 ' ,
45
- 'password.between ' => '密码输入有误 ' ,
45
+ 'password.max ' => '密码输入长度有误 ' ,
46
46
];
47
47
}
48
48
}
You can’t perform that action at this time.
0 commit comments