Best practices for email address validation (including the + in gmail addresses)

后端 未结 5 1991
长情又很酷
长情又很酷 2021-02-09 12:46

I know there are a lot of questions on here about email validation and specific RegEx\'s. I\'d like to know what the best practices are for validating emails with respect to hav

5条回答
  •  南旧
    南旧 (楼主)
    2021-02-09 13:09

    I would tend to go with something along the lines of /.+@.+\..+/ to check for simple mistakes. Then I would send an email to the address to verify that it actually exists, since most typos will still result in syntactically valid email addresses.

提交回复
热议问题