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.
I had to create an account with apple the other day and apparently "myname@mydomain.dev" isn't a valid email address... Guess if it's not a .com then it's not real :/
Of course it ate shit when i tried to use a burner Gmail too, but in a different way. Fuck them for requiring an account to download the xcode CLI tools
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.
You're correct, current is RFC2822 (I think). The point, besides being a smartass, was that checking email address validity with just regexp is not a very good approach anyways. What you described makes much more sense, specially by verifying that the address is not just technically correct but that it actually belongs to the person filling the form.
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:
I had to create an account with apple the other day and apparently "myname@mydomain.dev" isn't a valid email address... Guess if it's not a .com then it's not real :/
Of course it ate shit when i tried to use a burner Gmail too, but in a different way. Fuck them for requiring an account to download the xcode CLI tools
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.
You're correct, current is RFC2822 (I think). The point, besides being a smartass, was that checking email address validity with just regexp is not a very good approach anyways. What you described makes much more sense, specially by verifying that the address is not just technically correct but that it actually belongs to the person filling the form.