[Vuejs]-How to hide password with emoji instead of an asterisk (VueJS)

0👍

simple approach is:

use the text type input. on keyup change, when letter added, push letter (last letter) in certain array (xyz) and replace that in input field (with emoji randomize). and when a letter removed from input field, remove from certain array(xyz).
finally get certain array and merge element and send to server as password.

0👍

I think you can’t do that, the length of the value you want is not accessible / inconsistent.

Because every time you emit an input (type) you will get the real value from input text.

And for the length calculation emoji is different with char, 6 char is not equal with 6 emoji. for example:

  • “garuda” you’ll get length for 6
  • “😀😁😂🤣😇🙃” you’ll get length 12

So, when you type first char it will replace with first emoji. And the next you type you will get first emoji and the last char you typed, which is when you calculate the length it will not get 2 char but about 3.

Leave a comment