• hig13@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    17 days ago

    Couldn’t you just make it so the text box doesn’t accept spaces to prevent that? Why allow a character to be input that makes the field invalid?

    • dev_null@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      17 days ago

      Of course you can. But whoever developed the form didn’t care about their craft.

      • boonhet@sopuli.xyz
        link
        fedilink
        arrow-up
        0
        ·
        17 days ago

        Or they work for a for-profit company so there’s KPIs on how much they go under/over estimate on a task and either someone else did the estimate, or coworkers judge them for conservative estimates, so they did it as quickly as possible

      • tigeruppercut@lemmy.zip
        link
        fedilink
        arrow-up
        0
        ·
        17 days ago

        Japan has gotten a lot better but you still run into shit for this sometimes. First and middle names often have to be input without a space, so you end up with Johnwendell Anderson. And sometimes forms require names to be input with the Japanese phonetic alphabet (which lacks a lot of letters in English), and then if it doesn’t match some document you need to verify an online input there can be trouble. So Jeeves would become Jiibuzu, and good luck matching that to your passport at the airport.

    • gwl [he/him]@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      0
      ·
      17 days ago

      Yeah, that’s also a bad idea, there’s plenty of (mostly none-western) forenames that contain spaces, and plenty of surnames that contain spaces all over the world (Charles de Gaul, Guy Manuel de Hommen-baron)

      All they really need to do is to onSubmit do a .trim() to the name

      • Kushan@lemmy.world
        link
        fedilink
        English
        arrow-up
        0
        ·
        17 days ago

        As a primarily backend engineer, I think the opposite here. The backend makes sense, JS is just a nightmare.

        • MonkderVierte@lemmy.zip
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          17 days ago

          From the typical web developer’ view of course. They don’t even know the <form><input type="submit"> thing anymore nowadays, neither the people who developed their framework. Can’t apply for a job, because the js-form has a bug!

    • FooBarrington@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      17 days ago

      Because even if a space at the end of the name should be considered invalid, people can have names with spaces inside.

      • Whats_your_reasoning@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        17 days ago

        This is true. I know someone with a legal first name that’s two words. He’s a kid I work with. His parents made a point that his name isn’t one or the other, it’s both, and we are to address him as such.

        To my understanding (as a non-tech person who consumes tech-related media), name fields are commonly culturally biased. Usually it impacts last names, which can vary in size and layout across the world, sometimes including hyphens (which some systems don’t like either.) Super short or long names also run into problems. Not everyone has one first name, one middle name, and one last name, but a lot of systems aren’t designed to handle that kind of variation.