I want to check the value of a textbox that whether it contains a particular set of strings or not. How do I do this? (preferably using jquery)
I have a textbox where a user enters something. I want to check whether the string he enters contains BOTH "@" and "port". Please help..
I tried using contains but it is giving false positives.
Here is the code I used.
if($("#id:contains('@'):contains('port')")) {
$("#1st").hide();
$("#2nd").show();
} else {
alert("Wrong value entered.");
}