So you think you can validate email addresses

What is valid email?

How do you know? How do you validate an email?

Which of these emails are valid?

  • ==Valid
  • hi@ ==Invalid. No domain
  • ==Valid
  • ==Valid
  • ==Invalid. Can't have dot at the end
  • ==Invalid --- Can't have two dots in a row -!#$%&'#(-/=? ==Invalid
  • f* == Valid
  • #$%!^/& ==Valid
  • h(a) ==Invalid. No parentheses allowed! (Are you kidding me?)
  • (sta) ==Valid. Its comment and will be ignored by the mail server ==Still Valid
  • ==Invalid. Because you have two at signs
  • "<\"@\".!#%$ ==Invalid
  • <\"@\".!#%$ ==Invalid
  • "hi@you" ==Valid. You can have quoted at sign
  • "hi you" ==Valid.
  • " " ==Valid.
  • hi"@" ==Invalid. Qoutes must be dot-sparated


This video is amazingly mind blowing. You have to watch it if you have ever done email validation and thought you got it right. You will be puzzled.

The list above is not complete

Subscribe for coding videos

Keep growing professionally with just three curated videos weekly.

We hate spam as much as you do.