Aligned password length requirements

Updated all password validation to use central password defaults
system while updating length requirements to now all match
at 8 characters minimum.

Some language text was technically correct (More than 7 characters)
but this has been updated for clarity and to prompt other translations
to be updated.

Closes #2237
This commit is contained in:
Dan Brown
2021-12-18 16:31:48 +00:00
parent 04f37e21e2
commit bb9cd9d610
7 changed files with 44 additions and 41 deletions

View File

@ -13,6 +13,7 @@ use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rules\Password;
class RegisterController extends Controller
{
@ -70,7 +71,7 @@ class RegisterController extends Controller
return Validator::make($data, [
'name' => ['required', 'min:2', 'max:255'],
'email' => ['required', 'email', 'max:255', 'unique:users'],
'password' => ['required', 'min:8'],
'password' => ['required', Password::default()],
]);
}