Home > Mobile >  password type input but show some of the text for different user roles
password type input but show some of the text for different user roles

Time:01-07

I am creating a user management system which have 2 user roles: Admin and Staff

When admin checking the user information it will show all the data that query from database

Example: enter image description here

my aim is to hide the phone number/ contact number when it show to the Staff user and only show them the last 4 digits of the phone number

example :

enter image description here

I have no idea how to make this archieve

CodePudding user response:

Instead of masking the input in the UI, it's better to change the actual value in the backend with a some code like this:

phoneNum = '####'   phoneNum.substring(4)

this is also better that just change the input type because it would also be easely bypassed.

  •  Tags:  
  • Related