submitted 7 months ago* (last edited 7 months ago) by to c/programmer_humor@programming.dev
 

...

you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 7 months ago (2 children)

Email validation for a form should at most look for

  • at least one character
  • followed by @
  • followed by at least one character
  • followed by .
  • followed by at least two characters

Sending an email can take a few minutes. Form validation is instant.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 5 points 7 months ago

    Which would still not be perfect because "foo@bar", "foo@[123.123.123.123]" and "💩 @[IPv6 :::1]" are all technically valid email addresses.

    It looks like the only validation that doesn't block something valid pretty much would start and end at "It has at least one @ symbol, and something on both sides".

  • source
  • parent