Return to Snippet

Revision: 47261
at June 3, 2011 20:34 by erraja_07


Initial Code
function isSpclChar(comments)
	{
		var iChars = "[email protected]#$%^&*()+=-[]\\\';,./{}|\":<>?";
		var cnt=0;
		for (var i = 0; i < comments.length; i++)
		{
			if (iChars.indexOf(comments.charAt(i)) != -1)
			{
				cnt=cnt+1;
			}
		}
		if(cnt==comments.length)
			return false;	
		else
			return true;
	}

Initial URL


Initial Description


Initial Title
Javascript Special Characters validation

Initial Tags
js, validation

Initial Language
JavaScript