Suggestion / Requested Feature
Change the BitWarden Vault new / editing Credit Card form to use an input mask (or similar concept) so that when adding / editing a credit card number, it will add imaginary spaces between each block of 4 digits, so that as the user literally types “1234567890”… this is displayed as they type as: “1234 5678 90”…
- Currently when entering / editing a credit card number, the correct way to enter it the number is to type only the numbers, e.g. literally type 1234567812345678.
- If this is done, then when viewing the credit card number, it will display as 4x blocks of 4-digits - e.g. 1234 5678 1234 5678.
- However, when entering / editing a credit card number this formatting is not shown and the credit card number to edit will be shown visually as 1234567812345678 (a single 16-digit number).
Disadvantages of current situation
- As there is no formatting of the number when it is entered / edited, this can make it more difficult to read and check.
- Also, to make the number easier to read/check when typing, users may be implicitly tempted to type the credit card number with spaces – however (AFAIK) the spaces are stored as part of the number meaning this then causes the number typed in as “1234 5678 1234 5678” to be displayed after saving as “1234 567 8 12 34 5 678”.
Advantages of proposed change
- This will mean when adding, viewing or editing a credit card number, it is always shown in blocks of 4-digits.
- This will also improve data quality as spaces or other separation characters will be less likely to be entered and stored as part of the credit card number.
- [Optional enhancement]: The form could strip out spaces/other characters when saving.
This feature was initially suggested in response to a [at-the-time] believed bug that was causing the credit card number not to display correctly: Credit Card number display format issue · Issue #6177 · bitwarden/clients · GitHub