I use validate.js for form validation and have a password pattern where I would like to allow only one of the following special characters: -!@_#+
Password pattern is as below:
password1: {
pattern:/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[-!@_#+])(?=.{8,})/
},
However, when I enter *, $ or % character as password input no error message is given. Any help would be appreciated.
Thank you.