I have a multilingual website, where I want to restrict typing of other language characters (especially Chinese) using a regular expression. Can someone please give me an example how to implement this.
Fiddle:
$(".textTest input").keyup(function () {
if ($(this).val().match(/^[\u4E00-\u9FFF\u3400-\u4DFF\uF900-\uFAFF]+$/g)) {
alert('Chinese character sets');
}
else alert('English');
});