Hi everyone, I am asking participants in an anonymous survey to enter a password. I would like it to:
- be at least 8 characters long;
- include at least one digit;
- include at least one lowercase letter;
- include at least one uppercase letter.
The regex code I am using is:
(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})
However when I test it, passwords that only respect two constraints are validated, e.g. 1234567a or 1234567A. What am I doing wrong?
Thanks for your help!