gbif / gbif-api

GBIF API
Apache License 2.0
27 stars 5 forks source link

Regex on AbstractGbifUser doesn't allow dash (-) #20

Closed cgendreau closed 6 years ago

cgendreau commented 6 years ago

Emails like aa@aa.bb-cc.org are currently rejected but the format is actually valid.

MattBlissett commented 6 years ago

Do IDNs work?

example@prøve.dk is a valid address, but I don't know if it gets punycoded to example@xn--prve-hra.dk (the real domain) before the API sees it.

(Or अजय@डाटा.भारत)

cgendreau commented 6 years ago

IDNs will only be accepted if converted to Punycode first (wish is not the case at the moment). If at some point it is needed, the regex can be updated to use \p{L}\p{M} instead of A-Za-z.