sk5567
asked on
String validation
Hi
I need to validate a string in javascript. If the string contains single quote or double quote I should alert the user.So how do I check for them using javascript.
Thanks
sk5567
I need to validate a string in javascript. If the string contains single quote or double quote I should alert the user.So how do I check for them using javascript.
Thanks
sk5567
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try this:
alert("character ' and \" are not allowed");
alert("character ' and \" are not allowed");
ASKER
alert('charecter ' and " are not allowed.');
How to show them in the alert message?
-Sk5567