I\'m trying to create a validation for a password field which allows only the a-zA-Z0-9 characters and .!@#$%^&*()_+-=
a-zA-Z0-9
.!@#$%^&*()_+-=
I can\'t seem to
a sleaker way to match special chars:
/\W|_/g
\W Matches any character that is not a word character (alphanumeric & underscore).
Underscore is considered a special character so add boolean to either match a special character or _