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.
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.
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.