- Passwords will contain at least 1 upper case letter
- Passwords will contain at least 1 lower case letter
- Passwords will contain at least 1 number or special character
- There is no length validation (min, max) in this regex!
Regular expression for JavaScript:
/((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/
Well done @arielweinberger 🚀
Let me offer my two cents on how we can use
class-validator
to validate a password.The default error message is
password is not strong enough