We'd like to remind Forumites to please avoid political debate on the Forum... Read More »
We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
Long numbers without spaces in web forms
Options

Dave_C_2
Posts: 1,827 Forumite
I've just renewed my car tax on line , in common with some web forms (mostly from the gummint) I have to transcribe a long number from the paper form (which has spaces) to the web form (without the spaces). This makes entering and checking the number more prone to error and it takes a couple of goes to get it right.
Yet entering my long credit or debit card number in the same form with spaces on the same web form makes no difference. I know it's no big deal but it's frustrating.
Is this lazy programming by web developers, or am I missing something?
I know it's easy enough to strip out spaces in visual basic* but I haven't any experience of web forms.
Dave
*and even Z80 assembler, or is that showing my age?
Yet entering my long credit or debit card number in the same form with spaces on the same web form makes no difference. I know it's no big deal but it's frustrating.
Is this lazy programming by web developers, or am I missing something?
I know it's easy enough to strip out spaces in visual basic* but I haven't any experience of web forms.
Dave
*and even Z80 assembler, or is that showing my age?
0
Comments
-
Is this lazy programming by web developers, or am I missing something?
You can combine multiple fields, strip out spaces or any other padding character such as hyphen in bank sort codes. In fact you can pretty much do anything you want to with character strings and form fields.
I've found that router GUIs are frequently user hostile too making specification of IPs or MACs difficult for no good reason. That said some are good.0 -
Is this lazy programming by web developers, or am I missing something?
I know it's easy enough to strip out spaces in visual basic* but I haven't any experience of web forms.
Dave
*and even Z80 assembler, or is that showing my age?
Yep - it's trivial. And Z80 programming, now we're talking :-)0 -
I use notepad (or vi actually ) to type in the long ones and then copy and paste adds a step but I seem to have plenty of time to make sure4.8kWp 12x400W Longhi 9.6 kWh battery Giv-hy 5.0 Inverter, WSW facing Essex . Aint no sunshine ☀️ Octopus gas fixed dec 24 @ 5.74 tracker again+ Octopus Intelligent Flux leccy0
-
It's not always entirely lazy programming, one of the reasons to do it that way is to ensure that somebody who does not enter spaces doesn't end up entering too many characters, or at least notices when they attempt to.
If you know the number format, you could do 3 separate text boxes (e.g. 5,6,5 characters for a driving licence number) but that then introduces its own problems, do you put in a bit of javascript to move to the next text box after the fifth digit is entered in order to avoid confusing people who don't know what the tab key is for. If you do that then you will annoy people who habitually hit tab at the end of a text box and also annoy people who mistyped the 5th character and now they can't hit backspace to correct it. I'm sure the vast majority of people reading this will know how to react when faced with such a form but plenty of people don't and will end up calling complaining that the website is broken, or just give up and fill in the paper version instead.
Designing forms (both paper and web) is one of those annoying and fiddly jobs that is surprisingly more involved than you would think. The government departments that I deal with actually spend a lot of time tweaking and revising their forms based on trends in how the general public manage to screw them up. For some of my larger customers, just changing a single word to bold can reduce (or increase) call volumes to the enquiry line in the order of a few hundred per day and make significant differences to the data entry time in the case of paper forms.0 -
I get really annoyed by forms that ask for a number but don't tell you what format they want until after you've entered it, submitted the form and it errors. You then have to scroll up and down the page trying the find the field it doesn't like.
It is just bad design and bad programming.
Worst offenders are bank sort codes (is it 6 digits without spaces, with spaces, with dashes - how am I supposed to know - I'm not a mind reader) and telephone numbers.0 -
Thanks for your replies.
The general consensus and my opinion is that it's lazy programming by the DVLA, born out by the fact that the same form:
- cannot handle the long code number from the letter without spaces
- can handle the long number from my bank card with spaces.
Dave0 -
Yes, you do need to be consistent and that is pretty poor design, however credit/debit card numbers do present a particular challenge.
The banks won't accept the number with spaces, so you would think a 16 character box would suffice, however there are some cards out there (I think Amex are one, though I've never owned one of those to check) that have 19 character card numbers.
So now you need a 19 character box, which is just the right length for someone with a more common 16 character card to enter the spaces that you don't want.
The other problem with a 19 character box is eventually some plonker will enter the CVV2 into the remaining 3 characters and then you're into fun compliance issues as you're not allowed to store that number, so possibly can't send it back to the user with the error highlighted.
But yes a well designed form would strip out the spaces server-side and then process it anyway, and this is the DVLA so it's probably done very badly.0 -
"The other problem with a 19 character box is eventually some plonker will enter the CVV2 into the remaining 3 characters and then you're into fun compliance issues "
No you aren't, because you don't (and can't) know that it's the CV2.0 -
Thanks for your replies.
The general consensus and my opinion is that it's lazy programming by the DVLA, born out by the fact that the same form:- cannot handle the long code number from the letter without spaces
- can handle the long number from my bank card with spaces.
Dave
You read - you type, IBM gave you a keyboard to do just that. It's to the right of where you type. Called the Numeric keyboard. Often underused.
I don't recall Assembly language on the ZX - it used BASIC. Maybe that's why typing a number into a numeric keyboard is difficult for you?
Maybe, if this is an issue; do what I do when I find something wrong in the world. Rather than moaning about it, complain to them, and if enough people do it, they will change it?0 -
securityguy wrote: »"The other problem with a 19 character box is eventually some plonker will enter the CVV2 into the remaining 3 characters and then you're into fun compliance issues "
No you aren't, because you don't (and can't) know that it's the CV2.
I was referring to the extra 3 digits on the back. Depending on who designed the web form, they call it "security code" or "CVV2".
And trust me I've seen it done, on a paper form that was destined for archival too!0
This discussion has been closed.
Confirm your email address to Create Threads and Reply

Categories
- All Categories
- 350.9K Banking & Borrowing
- 253.1K Reduce Debt & Boost Income
- 453.5K Spending & Discounts
- 243.9K Work, Benefits & Business
- 598.8K Mortgages, Homes & Bills
- 176.9K Life & Family
- 257.2K Travel & Transport
- 1.5M Hobbies & Leisure
- 16.1K Discuss & Feedback
- 37.6K Read-Only Boards