Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit d2585e3

Browse files
author
Saeed Vaziry
committed
fix username
1 parent 6b56177 commit d2585e3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/Actions/Auth/UpdateUserProfileInformation.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ public function update($user, array $input): void
2929
'username' => [
3030
'required',
3131
Rule::unique('users')->ignore($user->id),
32-
'alpha_num:ascii'
32+
'alpha_num:ascii',
33+
'min:5',
3334
],
3435
'bio' => ['nullable'],
3536
])->validateWithBag('updateProfileInformation');

app/Actions/Users/UpdatePublicFields.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ protected function rules(User $user): array
3030
return [
3131
'username' => [
3232
'required',
33-
Rule::unique('users', 'username')->whereNot('id', $user->id)
33+
Rule::unique('users', 'username')->whereNot('id', $user->id),
34+
'alpha_num:ascii',
35+
'min:5',
3436
],
3537
'name' => [
3638
'required',

0 commit comments

Comments
 (0)