I need a good validation for tild(~) and tilt(`) character in PHP and Jquery. Here is the Jquery validation what i have made.
$.validator.addMethod("validSMS", function(value, element) {
if (value.indexOf('~') === -1 || value.indexOf('`') === -1)
{
return true;
}
else
{
return false;
}
}, "Tild and tilt Character is not allowed");
But I need another good method for this validation in Jquery and in PHP also.