wearebraid / vue-formulate

⚡️ The easiest way to build forms with Vue.
https://vueformulate.com
MIT License
2.25k stars 245 forks source link

E-mail validation rule #576

Open sgurin opened 1 year ago

sgurin commented 1 year ago

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 ("_")

justin-schroeder commented 1 year ago

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.

sgurin commented 1 year ago

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