Open forebitt opened 1 year ago
I'm trying to build an input which only accepts alphanumeric and emoji characters. This is my implementation:
import emojiRegex from "emoji-regex"; const isValidInput = (input: string) => { const emojisPattern = emojiRegex(); const alphanumPattern = /^[a-zA-Z0-9\s]+(\.app)?$/; const withoutEmojis = input.replace(emojisPattern, "e"); return alphanumPattern.test(withoutEmojis); };
this is the emoji "🧑🏼❤️🧑🏼" I'm trying to parse, the library is supporting all other variation of this emoji, except this variation. Is there a way to fix it? https://emojipedia.org/couple-with-heart-person-person-light-skin-tone-medium-skin-tone/
I'm trying to build an input which only accepts alphanumeric and emoji characters. This is my implementation:
this is the emoji "🧑🏼❤️🧑🏼" I'm trying to parse, the library is supporting all other variation of this emoji, except this variation. Is there a way to fix it? https://emojipedia.org/couple-with-heart-person-person-light-skin-tone-medium-skin-tone/