1var iChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?";
2
3for (var i = 0; i < document.formname.fieldname.value.length; i++) {
4 if (iChars.indexOf(document.formname.fieldname.value.charAt(i)) != -1) {
5 alert ("Your username has special characters. \nThese are not allowed.\n Please remove them and try again.");
6 return false;
7 }
8}
9
1var iChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?";
2
3for (var i = 0; i < document.formname.fieldname.value.length; i++) {
4 if (iChars.indexOf(document.formname.fieldname.value.charAt(i)) != -1) {
5 alert ("Your username has special characters. \nThese are not allowed.\n Please remove them and try again.");
6 return false;
7 }
8}