I am trying to validate an input text field to not allow icons to be pasted into it. For example, having this:
Hello
When I tried debugging, I noticed Javascript interpreted the icons in a Unicode format. So I tried using regex to only allow letters and exclude Unicodes.
Another problem arises, that is, to allow special characters of other languages (these are also converted to a range of Unicodes by Javascript.
To solve this I had to keep adding Unicode range for each language in the regex (this is a whole lot).
I need a better solution to help remove or not allow pasting icons like above to the input text field. I will appreciate your help with this. Thanks.