var regx = /^[A-Za-z0-9 _.-]+$/;
if(regx.test($($input).val()))
alert ("correct");
else
alert('Incorrect!');
}
If I enter in input, character @ or # works? for me this works, but I think that must be incorrect…
Why does not works fine?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’re missing an opening brace
{Change your
if ... elsestatement to:http://jsfiddle.net/Bp6fg/