On Tuesday, 6 February 2018 at 20:30:42 UTC, Steven Schveighoffer wrote:

The regex in question I think is to ensure an email address like abc@192.168.0.5 has a valid IP address. The D1 function doesn't support that requirement.



-Steve

An invalid IP is not necessarily an invalid email though.

You'd be surprised how much __garbage__ a valid email actually can contain.

https://www.w3.org/Protocols/rfc822/

Generally the best way to validate an email is just to check if there is a value before @ and a value after.

The real way to validate an email is to check if the email exists on a SMTP server, BUT some SMTP servers will not provide such information (Such as gmail I think?) and thus you can't really rely on that either.

Reply via email to