How strict should valid_email be?

EmmaCodesOP

Email validation is famously hard.

11

Comments 4

Log in to join the discussion.

Log in Create account
  1. AmeliaRunsreplies: 2

    For this challenge, keep it simple: one "@", something before it, and a dot in the part after it. Real-world validation is best done by sending a confirmation email — no regex catches everything.

    6
    1. EmmaCodesOPreplies: 1

      Simple rules + confirmation email. Practical.

      1
      1. LucasVD

        That one-liner is gold. Using it everywhere now.

        6
    2. LiamByte

      Joining words with single spaces: " ".join(name.split()) collapses any amount of whitespace. Nice trick for clean_name.

      0