Set email length validation to max SQL string length - Fixes #214

This commit is contained in:
Bubka 2023-08-04 09:48:47 +02:00
parent 6c78be8d0b
commit 7530a17e12
2 changed files with 4 additions and 4 deletions

View File

@ -24,8 +24,8 @@ public function authorize()
public function rules()
{
return [
'name' => 'unique:App\Models\User,name|required|string|max:255',
'email' => 'unique:App\Models\User,email|required|string|email|max:255',
'name' => 'unique:App\Models\User,name|required|string|max:191',
'email' => 'unique:App\Models\User,email|required|string|email|max:191',
'password' => 'required|string|min:8|confirmed',
];
}

View File

@ -29,13 +29,13 @@ public function rules()
'name' => [
'required',
'string',
'max:255',
'max:191',
Rule::unique('users')->ignore($this->user()->id),
],
'email' => [
'required',
'email',
'max:255',
'max:191',
Rule::unique('users')->ignore($this->user()->id),
],
'password' => 'required',