Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference RFC 6531 in email format validation #305

Closed
Sintendo opened this issue Apr 12, 2017 · 9 comments
Closed

Reference RFC 6531 in email format validation #305

Sintendo opened this issue Apr 12, 2017 · 9 comments

Comments

@Sintendo
Copy link

The "email" format explicitly references RFC 5322. We should consider referencing RFC 6531, so email addresses with non-ASCII characters can be recognized.

@awwright
Copy link
Member

This looks correct at first glance, but RFC 6531 doesn't obsolete RFC 5322 so this is probably a little more involved than just replacing the references.

@epoberezkin
Copy link
Member

epoberezkin commented Apr 17, 2017

I think there can be another format for such emails - there may be applications that do not allow non-latin characters in emails, so they would need the current definition...

For the reference, there was the conversation here: ajv-validator/ajv#434

@handrews handrews modified the milestone: draft-07 (wright-*-02) May 16, 2017
@handrews
Copy link
Contributor

@awwright would you prefer a separate format value for RFC 6531? @epoberezkin raised that in the Ajv issue that he linked to.

If I am reading RFC 6531, the part where it says that it does not modify RFC 5322 means that any email that is valid against RFC 5322 is also valid against RFC 6531. This feels analogous to URI vs IRI, though, and I would probably rather add "iri" and "iri-reference" instead of changing the meaning of "uri" and "uri-reference" so I guess I'm in favor of a separate keyword? (I'm going to file "iri[-reference]" if don't have that filed already...)

@handrews
Copy link
Contributor

@Sintendo or anyone else: any preferences on a name for the additional format? "i18n-email"? "smtp-utf8"? Those are the first that come to mind after skimming a bit of RFC 6531

If someone can name this thing, I'm happy to include it in this draft. it fits our general desire to be all modern and stuff :-)

@Sintendo
Copy link
Author

Both options look good to me. I think I prefer a name that still contains the text 'email' (that way it's more obvious that this new format is somehow related to the existing "email" format), so "i18n-email" gets my vote.

@Julian
Copy link
Member

Julian commented Sep 13, 2017

Can we just axe the email format instead :)

@handrews
Copy link
Contributor

@Julian in all seriousness I think it would make sense to give implementations more flexibility about how formats are implemented. Saying "if you implement format at all, you have to implement all formats" sets a really high bar for formats. I feel like we don't have a good story for why format behaves the way it does.

It's partially an annotation (informing applications about usage without constraining what they do with that information) and partially this weird optional validation thing that doesn't really offer useful guarantees. I don't know that we need to change that (except perhaps the flexibility thing) but I think it needs better framing and more clarity around why anyone would or would not implement them.

See also #54 for another approach that I'd love more feedback on.

@handrews
Copy link
Contributor

Apparently "IDN email" is the appropriate term. Or at least an appropriate term. So I'll go with "idn-email" as the format name, barring evidence to the contrary.

@handrews
Copy link
Contributor

Merged #408.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

5 participants