Naturally, you cannot reliably paste into any of them.
But then, my bank has disabled copying everywhere sort codes are displayed anyway!
Naturally, you cannot reliably paste into any of them.
But then, my bank has disabled copying everywhere sort codes are displayed anyway!
UX galore yet I feel we've gone backwards. The damn thing has so much padding it doesn't even fit on my full-HD monitor. Except it should, but they capped the height and made it so I have to scroll. I just don't have the words, I'll let you guys decide further from that image.
Excel will store the data as a number, and display it with the selected format, but you can't type it in with the spaces etc. - it needs to be input as just a number.
I think this way of doing things is quite common.
Type "LS29JT" and get an error because it does not like that you did not add the space "LS2 9JT"
Or even, type "LS2 9JT" and get an error because it does not like that you did add the space.
I'm not sure why. The Inward code is always Number-Letter-Letter. The outward code can be variable length and format. The space is certainly beneficial for visually parsing, but why W11AA isn't valid when W1 1AA is valid is confusing.
Letters received need only have the W1 part read, to see where they should be sent.
When they reach Westminster, the 1AA part is read to sort them for final delivery.
Sometimes you can feel that the code has been written by an engineer who is following the 'spec' to the letter instead of thinking of UX.
W111AA
One letter at a time, auto-inserting the space
W / W1 / W11 / W11 1 / W11 1A / W11 1AA
But for W1, you'd do
W / W1 / W11 / W1 1A / W1 1AA
Which would be jarring - you don't know when the inward code ends without typing a space, so you have to infer.
That said there's no reason not to allow [a-zA-Z0-9 ] and format after typing is finished (onBlur or even after submission).
(Poorly implemented address validation in the UK was behind the change in BFPO addresses 10 years ago -- https://fetchify.com/latest-news/lets-talk-about-bfpo-addres...)
Let the user type in the postcode and when they submit you can parse it as a whole maybe just in the backend, insert the space and display with the space from then on. Simple.
https://stackoverflow.com/questions/164979/regex-for-matchin...
These are almost universally displayed as two groups of three digits, that's seven characters, count them... separated by a hyphen and almost universally have to be entered in to a six character field, non-numeric characters not accepted.
Definitely one or my favourite minor annoyances.
However, if you paste a number with commas in it, it will display correctly, but on the next screen you will discover it is transferring a different amount, as if it parsed the number up to the first comma.
(As an aside, this is one of the underrated things about best-practice React: that kind of bug can never ever happen. What is displayed is fixed by the rendering of the data model, never the other way around.)