86
rated 0 times
[
91]
[
5]
/ answers: 1 / hits: 20966
/ 11 Years ago, thu, january 16, 2014, 12:00:00
I would like to all alphanumeric data +
only these following 4 special character are allowed.
' (single quote)
- (hyphen)
. (dot)
single space
I tried this :
var userinput = $(this).val();
var pattern = [A-Za-z0-9_~-!@#$%^&*()]+$
if(!pattern.test(userinput))
{
alert('not a valid');
}
but it is not working.
More From » jquery