Invitation email regex is not large enough



When inviting a user with email * (wildcard at domain dot tld), the completion field validates to (at domain dot tld). This bug also works with


  • Although rare, the wildcard character * and the tilde character ~ are both valid usernames in email. Therefore they should be acceptable.
  • The validation should return the exact same string as entered or fail.


  • Fix the regular expression to accept * or ~ as an email username. This does not mean ‘any user at domain’: it really means the user with email * at domain dot tld.
  • Ensure the field completion returns the same value as it was provided in case it validates.

(Stephen Chung) #2

I learn something new every day! Turns out that a whole bunch of special characters are valid as email addresses:

(Felix Freiberger) #3

Email addresses are very weird! All of these are valid email addresses:

  • "Test User"
  • "@"
  • felix(test)

Even worse: felix(test) is identical to, because (test) is a comment. And as comments can be nested, regular expressions cannot validate email addresses correctly!

(Stephen Chung) #4

Well, IMHO, people get what they deserve when they pick wacko email addresses!


EDIT: IMHO people should use ASCII letters/digits/dashes/dots only for email addresses. That should be most compatible with the world’s software.


I’m sorry but this kind of comments makes me cringe. Normality can never be the excuse for not doing something. Maybe people have good reason why they do things like they do, and your normalcy should never become an argument against their vision, especially when, by any agreed upon standard, their use is valid. You have a very straightforward line of thought from this argument to letting things rot because, you know, it’s normal.

(Stephen Chung) #6

@hellekin I stand corrected. :bow: