Adding password validation rule in Laravel

If you want to check if the password contains the following categories:

English uppercase characters (A – Z)

English lowercase characters (a – z)

Base 10 digits (0 – 9)

Non-alphanumeric (For example: !, $, #, or %)

Unicode characters

Create a regular expression first. It would look like this:


Then use it in the code . The Laravel code will be like given below:

'password' => 'required|




For Laravel 5.6 the laravel code will be:

'password' => ['required',