Why is jQuery's email validation regex so simple?

前端 未结 2 1363
萌比男神i
萌比男神i 2021-01-02 09:49

We all know that a regex to validate emails properly would be quite complicated. However, jQuery\'s validation plugin has a shorter regex (contributed by Scott Gonzalez

2条回答
  •  忘掉有多难
    2021-01-02 10:30

    That doesn’t look right: what’s with the Unicode? Which RFC is this validating against?

    See this answer for a proper RFC5322-validating regex.

提交回复
热议问题