I need to validate a Text box using javascript Id like to do it on keypress so that if a user enters a character they shouldnt, it displays a message. The only characters that should be allowed are A-Z 0-9 and all punctuation Im trying to do this to avoid people entering foreign characters such as Ĉ è æ Should I do this using a regular expression? Whats the easiest way to do this?
Ok, i knwo how regular expressions work I just need to know if there is an easier way rather than specifying [a-z][0-9] and then all the other special characters i want to allow....... Can i just exclude foreign characters?