A guy I know is trying to pitch a tool to people he made with AI. Which is to say AI made it for him, because his coding knowledge just about covers HTML and CSS, as best as I can tell, so everything else (and probably a good chunk of those too) is slopped up.
Recently, someone apparently had difficulties signing up with their email, but only their email. Their partner's worked fine. The guy was at a loss. I'm not sure he could read the code at all or has any idea of how troubleshooting works.
If it was open source, I'd probably look into it just out of curiosity. My money is on "AI trained on junior devs' output did the junior dev thing where they discover RegEx and try to use it for email input validation", because the provider has a dash in their domain and that's the simplest explanation for email address troubles.
He also should hire an actual developer to fix his shit. My rates start at 100€/h, increasing by 10€ every time he suggests I ask AI.
Sure, if the provider is RFC882 compliant. I believe 882 has since been superseded too?
I believe when I last researched the question to address some issue in my own regex, some Stackoverflow comment brought up an example of an address that could receive mail but wasn't compliant.
Hence the more robust approach, which is also the only feasible way to ensure that there are no typos and that the recipient is actually the one signing up: Send a verification mail to that recipient. If the correct confirmation token gets back to you, someone or something probably got and read that mail.
You can do some minimal check to avoid things like spaces, ensure there is an @ in there somewhere, but beyond that, it's really not sensible to check them against some long-winded regex.
Particularly when you're vibe-coding, can't know whether the generator got the regex correct and also can't debug it.
eating their own dog food, are they?
they'll have to hire an actual developer to fix it.
A guy I know is trying to pitch a tool to people he made with AI. Which is to say AI made it for him, because his coding knowledge just about covers HTML and CSS, as best as I can tell, so everything else (and probably a good chunk of those too) is slopped up.
Recently, someone apparently had difficulties signing up with their email, but only their email. Their partner's worked fine. The guy was at a loss. I'm not sure he could read the code at all or has any idea of how troubleshooting works.
If it was open source, I'd probably look into it just out of curiosity. My money is on "AI trained on junior devs' output did the junior dev thing where they discover RegEx and try to use it for email input validation", because the provider has a dash in their domain and that's the simplest explanation for email address troubles.
He also should hire an actual developer to fix his shit. My rates start at 100€/h, increasing by 10€ every time he suggests I ask AI.
It actually can be done: Mail::RFC822::Address: regexp-based address validation
It's really simple:
Sure, if the provider is RFC882 compliant. I believe 882 has since been superseded too?
I believe when I last researched the question to address some issue in my own regex, some Stackoverflow comment brought up an example of an address that could receive mail but wasn't compliant.
Hence the more robust approach, which is also the only feasible way to ensure that there are no typos and that the recipient is actually the one signing up: Send a verification mail to that recipient. If the correct confirmation token gets back to you, someone or something probably got and read that mail.
You can do some minimal check to avoid things like spaces, ensure there is an @ in there somewhere, but beyond that, it's really not sensible to check them against some long-winded regex.
Particularly when you're vibe-coding, can't know whether the generator got the regex correct and also can't debug it.