How to disable emojis on input fields

Hello fellow bubblers, I am working on a project that requires users to signup. The signup process requires a username which I use as the user’s slug. Anyways my question is, is there any way to restrict users from adding emojis :blush:! to an input field?. I successfully restricted special characters but can’t figure out how to restrict emojis. (Note: This often happens with mobile users.) See the image below.

username emoji

1 Like

Hey there @fuhclifffuhche,

You can probably use regex:

Hello, @johnny thanks for helping. but I’m still not sure how to go about it. I used a find and replace which helped to eliminate special characters. please explain how I can use regex to eliminate emojis

This topic was automatically closed after 70 days. New replies are no longer allowed.