Skip to main content

Email validation

We use a very, very basic check to verify the format of email addresses. This is recommended by Microsoft, and tweaked to allow one edge case with an underscore at the end of the username (username_@domain.com). All addresses should match this allowed format:

^((")(""+?"@)|(([0-9a-z_](( .(?!.))|[-!#\$%&'*+\/=\?\^`{}|~\w]))(?<=[0-9a-z_-])@))(([)([(\d{1,3}.){3}\d{1,3}])|(([0-9a-z][-0-9a-z][0-9a-z]*.)+[a-z0-9]{2,17}))$

Basically, usernames and domains should start and end with standard alphabet letters.