2

When we sign in to our online bank we often use our social security number which from the government has a dash in it. As in YYMMDD-XXXX (for Swedish). And when we want to transfer money from our account to another account, the number contains dots(.) and dashes(-).

But should they be typed by the user when entering numbers only, or should they be left out?

  • 2
    To avoid annoyance, I think you should let the user type/paste the numbers with any tokens in them e.g. {"-", " "}, then filter them out when processing them. – Danny Varod Jul 25 '15 at 9:21
  • @DannyVarod Care to extend the comment to an answer? I'd love to hear more on your reasoning. Thank you – Benny Skogberg Jul 25 '15 at 10:20
  • Try copying a phone number or a serial number with tokens into a field that does not accept non numeric characters, you will feel the annoyance. – Danny Varod Jul 26 '15 at 11:05
2

I believe that this is well covered by the Forgiving Format pattern. In a nutshell, it says that various dividers and separators might make it easier for a user to read the number and to double-check that the number is indeed correct, but the input field must be smart enough to also accept it without dividers, or with different types of dividers - dots, slashes, spaces etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.