Validate emoji in HTML input by JavaScript Prevent inserting emoji to an HTML input element and validate the input in JavaScript /[\p{Extended_Pictographic}\u{1F3FB}-\u{1F3FF}\u{1F9B0}-\u{1F9B3}]/gu Source GitHub CodePen Useful links https://unicode.org/reports/tr51/#Emoji_Properties https://stackoverflow.com/questions/18862256/how-to-detect-emoji-using-javascript https://stackoverflow.com/questions/64389323/why-do-unicode-emoji-property-escapes-match-numbers Open-sourced repo https://github.com/milesj/emojibase https://emojibase.dev/