I have to use regex for my password validation that include special characters at least one.
https://en.wikipedia.org/wiki/ASCII
export const passwordValidation = password => {
const regPassword = /^(?=.*?[#?!@$%^&*-]).{8,}$/
return regPassword.test(password)
}
I tried this way but I think this isn't good way. Is there other way to check all special characters by ascii code except alphanumeric ?