1use Illuminate\Validation\Rules\Password;
2
3
4$request->validate([
5 'password' => [
6 'required',
7 'confirmed',
8 Password::min(8)
9 ->mixedCase()
10 ->letters()
11 ->numbers()
12 ->symbols()
13 ->uncompromised(),
14 ],
15]);
1'password' => 'required|
2 min:6|
3 regex:/^.*(?=.{3,})(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[\d\x])(?=.*[!$#%]).*$/|
4 confirmed',
5
1 $request->validate([
2 'email' =>'required|exists:users',
3 'password'=>'required|password'
4 ]);