Validator.js: minSymbol error

Created on 14 Mar 2021  路  6Comments  路  Source: validatorjs/validator.js

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 })

馃悰 bug

Most helpful comment

@HyperNovaVY A new version is coming soon

All 6 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Maxreglez picture Maxreglez  路  3Comments

AnandChowdhary picture AnandChowdhary  路  3Comments

IOAyman picture IOAyman  路  4Comments

karladler picture karladler  路  3Comments

philfreo picture philfreo  路  3Comments