It is not working in Laravel 10, How can I develop it in a proper way?
'password' => [
'required|confirmed',
Password::min(8)
->letters()
->mixedCase()
->numbers()
->symbols()
->uncompromised()
],
Trying strong password validation in Laravel 10 but it does not work. Hope an expert helps me to develop this.
2
Answers
Solution:
I’m not a expert but I can try helping you
Laravel Validation have alot of rules
Explanation of this regex pattern:
^
asserts the start of the line.(?=.*[a-z])
means there must be at least one lowercase letter.(?=.*[A-Z])
means there must be at least one uppercase letter.(?=.*d)
means there must be at least one digit.(?=.*W)
means there must be at least one special character (not a letter or digit)..+
matches any character (letters, digits, symbols) one or more times.$
asserts the end of the line.