The script below will help verify the correctness of the set in the field. This will limit the input of certain characters in the text entry field .Check symbols in a text entry field can be either at the input, and when a specific event . The script can use the registration fields , login form , etc. You can deny how certain characters or group of characters . For example , it is possible to completely ban entry of numbers , disallow space characters , tabs , prohibit Cyrillic or Latin .
Code
<input type="TEXT" onkeyup="var yratext=/['0-9',':']/; if(yratext.test(this.value)) alert('Enter the prohibited characters')">
Character Groups
'0-9' или '\d' - Numerical values
'а-я' -Cyrillic lowercase letters
'А-Я' - Cyrillic capital letters
'А-я' - All the letters of the Cyrillic alphabet
'a-z' - Latin lowercase letters ( first letter of the Latin )
'A-Z' - The capital letters of the Latin alphabet ( the first letters of the Latin )
'A-z' - All the letters of the Latin alphabet ( the first letters of the Latin )
'A-я' - All letters ( first letter of the Latin )
'\w' - All letters, numbers and symbol "_"
'\s' - Space characters , tabs, and paragraph
That version of the code , which when you enter an incorrect character field is empty :