Skip to content

Commit

Permalink
Merge branch '1467-check-user-password-minimum-length-and-correct-tex…
Browse files Browse the repository at this point in the history
…t' into develop
  • Loading branch information
PG-Momik committed Jul 9, 2024
2 parents d716327 + e052f38 commit 19de904
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions app/Http/Requests/User/UserProfileRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ public function rules(): array

if ($form_type === 'password') {
$rules = [
'current_password' => ['required', 'string', 'min:6', 'max:255'],
'password' => ['required', 'string', 'min:6', 'max:255', 'confirmed'],
'password_confirmation' => ['required', 'string', 'min:6', 'max:255'],
'current_password' => ['required', 'string', 'min:8', 'max:255'],
'password' => ['required', 'string', 'min:8', 'max:255', 'confirmed'],
'password_confirmation' => ['required', 'string', 'min:8', 'max:255'],
];
}

Expand Down
4 changes: 2 additions & 2 deletions app/Http/Requests/User/UserRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public function rules(): array
'full_name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'email', 'regex:/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,}$/ix', 'max:255', 'unique:users,email', 'not_in_spam_emails'],
'status' => ['required'],
'password' => ['required', 'string', 'min:6', 'max:255', 'confirmed'],
'password_confirmation' => ['required', 'string', 'min:6', 'max:255'],
'password' => ['required', 'string', 'min:8', 'max:255', 'confirmed'],
'password_confirmation' => ['required', 'string', 'min:8', 'max:255'],
];

if ($role === 'admin') {
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Requests/User/UserUpdateRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public function rules(): array
];

if (!empty(Arr::get($request, 'password', null))) {
$rules['password'] = ['required', 'string', 'min:6', 'max:255', 'confirmed'];
$rules['password_confirmation'] = ['required', 'string', 'min:6', 'max:255'];
$rules['password'] = ['required', 'string', 'min:8', 'max:255', 'confirmed'];
$rules['password_confirmation'] = ['required', 'string', 'min:8', 'max:255'];
}
if ($role === 'admin') {
$rules['role_id'] = 'required';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public function rules(): array
'username' => ['required', 'max:255', 'string', 'unique:users,username', 'regex:/^[a-z]([0-9a-z-_])*$/'],
'full_name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'email', 'regex:/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,}$/ix', 'max:255', 'unique:users,email', 'not_in_spam_emails'],
'password' => ['required', 'string', 'min:6', 'max:255', 'confirmed'],
'password_confirmation' => ['required', 'string', 'min:6', 'max:255'],
'password' => ['required', 'string', 'min:8', 'max:255', 'confirmed'],
'password_confirmation' => ['required', 'string', 'min:8', 'max:255'],
];
break;
}
Expand Down
4 changes: 2 additions & 2 deletions resources/assets/js/views/web/IatiRegisterPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ export default defineComponent({
placeholder: 'Type password here',
id: 'password',
required: true,
help_text: 'Minimum length: 6 characters',
help_text: 'Minimum length: 8 characters',
type: 'password',
class: 'mb-4 lg:mb-2',
},
Expand All @@ -677,7 +677,7 @@ export default defineComponent({
placeholder: 'Type password here',
id: 'password-confirmation',
required: true,
help_text: 'Should match the password above',
help_text: 'This should match the password on the left',
type: 'password',
class: 'mb-4 lg:mb-6',
},
Expand Down

0 comments on commit 19de904

Please sign in to comment.