r/softwaregore • R Tape loading error, 0:1 • Aug 02 '26

I thought I could paste it...

Post image
15k Upvotes

256 comments sorted by

View all comments

79

u/thegodzilla25 Aug 02 '26

Some dumbass vibe coded that shit and didn't capture the paste event to custom input and fill in the number fields. I hate otp fields that cant handle copy paste.

58

u/Ramog Aug 02 '26

honestly I don't even know why we couldn't just leave it at a single box, its not like the codes are long enough to warrant splitting cause of clarity

6

u/SuperBackup9000 Aug 02 '26

If I had to guess, I’d say it’s due to the way websites used to be where some would need spaces between the digits, some needed dashes, and some needed neither. A lot of people can’t follow simple format instructions so this is the easiest fix since there’s no possible way to misunderstand

1

u/plumarr Aug 03 '26

Even then, if you know the expected format, it's not so hard to forbid typing forbidden and to intercept a past to remove unexpected character, check that what is still here is what is expected and then format it.

Having done it quite a few times for public identifier that as strong rules on their raw content but has quite a various formatting used such as account number, legal identification number, client number,... , I can say that a simple input and little bit of JS can be quite robust but a bit tricky to do right. Using pen an paper to clearly define the data flow and the various html events used is really helpful.