Skip to content

Commit 1eebb17

Browse files
committed
update: store
1 parent 2d26577 commit 1eebb17

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

laravel/app/Http/Requests/User/Store.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public function authorize()
2424
public function rules()
2525
{
2626
return [
27-
'name' => 'required|between:5,80',
28-
'email' => 'email|max:255',
27+
'name' => 'required|between:3,80',
28+
'email' => 'nullable|email|max:255',
2929
'password' => 'required|between:5,80',
3030
];
3131
}
@@ -39,11 +39,11 @@ public function messages()
3939
{
4040
return [
4141
'name.required' => '名称不能为空',
42-
'name.between' => '名称输入有误',
42+
'name.between' => '名称输入长度3-80位',
4343
'email.email' => '邮箱格式有误',
4444
'email.max' => 'cid 输入有误',
4545
'password.required' => '密码不能为空',
46-
'password.between' => '密码输入有误',
46+
'password.between' => '密码输入长度5-80位',
4747
];
4848
}
4949
}

laravel/app/Http/Requests/User/Update.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public function authorize()
2424
public function rules()
2525
{
2626
return [
27-
'name' => 'required|between:5,80',
28-
'email' => 'email|max:255',
27+
'name' => 'required|between:3,80',
28+
'email' => 'nullable|email|max:255',
2929
'password' => 'max:80',
3030
];
3131
}
@@ -39,10 +39,10 @@ public function messages()
3939
{
4040
return [
4141
'name.required' => '名称不能为空',
42-
'name.between' => '名称输入有误',
42+
'name.between' => '名称输入长度3-80位',
4343
'email.email' => '邮箱格式有误',
4444
'email.max' => 'cid 输入有误',
45-
'password.between' => '密码输入有误',
45+
'password.max' => '密码输入长度有误',
4646
];
4747
}
4848
}

0 commit comments

Comments
 (0)