vue-formulate icon indicating copy to clipboard operation
vue-formulate copied to clipboard

E-mail validation rule

Open sgurin opened this issue 2 years ago • 2 comments

Hi.

E-mail validation rule passes special avoided characters. For, example #.

image

According to RFC 5322, the local part of an email address can contain a combination of letters, digits, and the following special characters:

Period (".") Plus sign ("+") Hyphen ("-") Underscore ("_")

sgurin avatar Feb 23 '23 15:02 sgurin

This is more complex than it appears at first and there are conflicting RFCs about this. RFC3696 allows characters like # in various circumstances. Since the worst case scenario is to prevent someone from entering a valid email address this rule takes a permissive approach to email.

justin-schroeder avatar Feb 23 '23 15:02 justin-schroeder

RFC 3696 is an informational document that provides guidelines for validating and formatting email addresses. While it does not define the syntax of email addresses, it provides recommendations for checking and validating email addresses in order to avoid common errors.

So, where is the golden middle? For example, Google does not allow to use # in e-mails

sgurin avatar Feb 23 '23 15:02 sgurin