Whenever I set minSymbol : 1 in options and I pass only 1 special character '@' in password field. I get validation error that strong password is required. But when I pass 2 special characters then it accepts the value.
{
"errors": {
"password": {
"name": "ValidatorError",
"message": "Please provide a strong password!",
"properties": {
"message": "Please provide a strong password!",
"type": "user defined",
"path": "password",
"value": "Ravi@1"
},
"kind": "user defined",
"path": "password",
"value": "Ravi@1"
}
},
"_message": "login validation failed",
"name": "ValidationError",
"message": "login validation failed: password: Please provide a strong password!"
}
Below is my config
validator.isStrongPassword(val, {
minLength: 6,
minLowercase: 1,
minUppercase: 1,
minNumbers: 1,
minSymbols: 1
})
Hi @Utsav-Sharma33 this feature has not yet been released in the library, you have to wait for the next update to treat @ as a valid symbol.
Why is this still a bug? Just need to add "@" to the symbolRegex variable in /lib/isStrongPassword.js
Hi @Utsav-Sharma33 this feature has not yet been released in the library, you have to wait for the next update to treat
@as a valid symbol.
@HyperNovaVY 馃榿
Bruh, there is a 3 months PR that fixed that and is still dead lol @fedeci
@HyperNovaVY A new version is coming soon
Today should be the day.
Most helpful comment
@HyperNovaVY A new version is coming soon