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
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 :
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.


