0

(:

I'm working on some input validation with js and one of the criteria is that the user is not allowed to input emojis.

This is the code that I was using originally is:

emojiValidation: function (userInput) {
   if (new RegExp("\\p{Extended_Pictographic}", 'u').test(userInput)) {
      return true;

   }
   
   return false;

This function is being called from a js file but the application is built using asp.net

The problem I'm facing is that IE does not recognise the Unicode flag, so is there an IE-friendly way to detect emojis?

IE console error

Thank you!

0 Answers0