Skip to content

Commit

Permalink
Merge pull request #146 from fyfe/fix/email-validator
Browse files Browse the repository at this point in the history
getaddresses() sometimes produces empty entries when ; is used
  • Loading branch information
tonioo committed Jan 26, 2018
2 parents f80ab8b + 9fa0892 commit fd9fd7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modoboa_webmail/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class EmailListValidator(object):
def __call__(self, value):
value = force_text(value)
addresses = getaddresses([value])
[validate_email(email) for name, email in addresses]
[validate_email(email) for name, email in addresses if email]


validate_email_list = EmailListValidator()

0 comments on commit fd9fd7f

Please sign in to comment.