Skip to content

Instantly share code, notes, and snippets.

@aseredenko
Created January 19, 2016 14:15
Show Gist options
  • Save aseredenko/4ed5d8c1c039b38f6ec0 to your computer and use it in GitHub Desktop.
Save aseredenko/4ed5d8c1c039b38f6ec0 to your computer and use it in GitHub Desktop.
validateInputSymbolsByRegExp
function isRussian(input) {
var value = input.value;
var rep = /[\x00-\x7F]/;
if (rep.test(value)) {
value = value.split(rep).join("");
input.value = value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment