I\'m trying to create a validation for a password field which allows only the a-zA-Z0-9 characters and .!@#$%^&*()_+-=
I can\'t seem to
This regex works well for me to validate password:
/[ !"#$%&'()*+,-./:;<=>?@[\\\]^_`{|}~]/
This list of special characters (including white space and punctuation) was taken from here: https://www.owasp.org/index.php/Password_special_characters. It was changed a bit, cause backslash ('\') and closing bracket (']') had to be escaped for proper work of the regex. That's why two additional backslash characters were added.