We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What problem you are trying to solve? I'm trying to create a mask for allowing only emojis
Describe the solution you'd like To be able to use character class escapes to define the regex for the mask https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Unicode_character_class_escape For example /\p{Emoji_Presentation}/u.test('😅') This returns true but the following code doesn't mask the field to only allow emojis. It doesn't allow any input.
true
IMask(field, { mask: /^\p{Emoji_Presentation}+$/u });
Describe alternatives you've considered
I also tried
IMask(field, { mask: '0#0000', definitions: { '#': /\p{Emoji_Presentation}/u } });
The text was updated successfully, but these errors were encountered:
I just tried
mask: value => { console.log(value); return /^\p{Emoji_Presentation}*$/u.test(value) }
and value comes as some garbage like � instead of the emoji so there probably some issue on the value arrives to be evaluated.
�
Sorry, something went wrong.
No branches or pull requests
What problem you are trying to solve?
I'm trying to create a mask for allowing only emojis
Describe the solution you'd like
To be able to use character class escapes to define the regex for the mask
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Unicode_character_class_escape
For example
/\p{Emoji_Presentation}/u.test('😅')
This returns
true
but the following code doesn't mask the field to only allow emojis. It doesn't allow any input.
Describe alternatives you've considered
I also tried
The text was updated successfully, but these errors were encountered: