Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

143
Views
Input field should not allow icons with input field text JavaScript

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.

about 4 years ago ยท Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
ยฉ 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!