I have the following regex which does not allow certain special characters:
if (testString.match(/[`~,.<>;':/[]|{}()-=_+]/)){
alert(password not valid);
}
else
{
alert(password valid);
}
This is working. This regex will accept a password if it does not contain any of the special characters inside the bracket (~,.<>;':/[]|{}()-=_+)
.
My problem here is it also don't allow me to input numbers which is weird.
Anything I missed here? Thanks in advance!
Here is a sample: