So before any one shuts this down, I am referencing an answer and asking a question here.
So the question I have is I want a strong password validation for laravel, something that includes 10 character, numbers, upper lower case, so on and so forth.
I found it: https://stackoverflow.com/a/31549892/1270259
The problem is, this regex looks off:
/^.*(?=.{3,})(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[\d\X])(?=.*[!$#%]).*$/
And since I am not good with regex I thought I would ask how can I fix it such that it validates:
- Must be 10 characters long
- Must contain upper and lower case
- Must contain at least one number
- Must contain at least one special character.
I feel like they were close in the answer. When this is run against github actions the error that comes back is preg_match(): Compilation failed: escape sequence is invalid in character class at offset 46
.
Any thoughts as too how I can make this work for Laravel 7 to match the above constraints?