All considered symbols in validator.js?

474 Views Asked by At

I use the .isStrongPassword() function from validator.js. By default it checks if the password contains at least one symbol. Unfortunately I can't find a set of all the chars that are considered a symbol by validator.js. Also generally there does not seem to exist a uniform opinion/definition about that. So now I am a little confused. Any help/opinions highly appreciated :)

1

There are 1 best solutions below

1
On

By looking in the code for validator.js, found here, this is the regex used for the symbols:

/^[-#!$@%^&*()_+|~=`{}\[\]:";'<>?,.\/ ]$/

So, all of the US standard keyboard characters are used, including a space:

- # ! $ @ % ^ & * ( ) _ + | ~ = ` { } [ ] : " ; ' < > ? , . /