Answers for "password validation in laravel 8"

PHP
1

Laravel Password Validation

'password' => 'required|
               min:6|
               regex:/^.*(?=.{3,})(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[\d\x])(?=.*[!$#%]).*$/|
               confirmed',
Posted by: Guest on August-14-2021
1

validate password laravel

$request->validate([
            'email' =>'required|exists:users',
            'password'=>'required|password'
        ]);
Posted by: Guest on July-07-2021
0

validate user password laravel8

$data = request()->validate([
        'firstname' => ['required', 'string', 'max:255'],
        'lastname' => ['required', 'string', 'max:255'],
        'username' => ['bail', 'nullable', 'string', 'max:255', 'unique:users'],
        'email' => ['bail', 'nullable', 'string', 'email:rfc,strict,dns,spoof,filter', 'max:255', 'unique:users'],
        'new_password' => ['nullable', 'string', 'min:8'],
        'confirm_new_password' => ['nullable', 'required_with:new_password', 'same:new_password'],
        'current_password' => ['required', function ($attribute, $value, $fail) {
            if (!\Hash::check($value, Auth::user()->password)) {
                return $fail(__('The current password is incorrect.'));
            }
        }]
    ]);
Posted by: Guest on October-07-2021

Code answers related to "password validation in laravel 8"

Browse Popular Code Answers by Language