Laravel 8.x Released Strong Password Validation Rule

Hi artisan Laravel 8.x has released strong password validation feature.  Artisan in this laravel 8 password validation example i will show you how you can validate password and make a strong password validation using laravel default features.

You know that yesterday in Laravel 8.x an extra feature for password validation is added. Now you can validate password in your Laravel 8.x like belowNo need to use any package for creating strong password in laravel 8.x application.

If you want to use strong password then use and To ensure that passwords have an adequate level of complexity, you may use Laravel's Password rule object:




See those example 

use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rules\Password;

$validator = Validator::make($request->all(), [
    'password' => ['required', 'confirmed', Password::min(8)],


The Password rule object allows you to easily customize the password complexity requirements for your application, such as

// Require at least 8 characters...

// Require at least one letter...

// Require at least one uppercase and one lowercase letter...

// Require at least one number...

// Require at least one symbol...


In addition, you may ensure that a password has not been compromised in a public password data breach leak using the uncompromised method:



You can do also that ensure the password appears less than 3 times in the same data leak...



Of course, you may also chain all the methods in the examples above:



Read also : Regex Strong Password Validation Example in Laravel


Hope it can help you.


#laravel #laravel-8x #validation #regex