1
0
mirror of https://github.com/Mailu/Mailu.git synced 2025-01-18 03:21:36 +02:00

Forwarding emails option in user settings did not support 1 letter domains.

This commit is contained in:
Dimitri Huisman 2022-08-04 14:51:20 +00:00
parent cb70f10a49
commit 57865495d4
2 changed files with 2 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class MultipleEmailAddressesVerify(object):
self.message = message
def __call__(self, form, field):
pattern = re.compile(r'^([_a-z0-9\-]+)(\.[_a-z0-9\-]+)*@([a-z0-9\-]{2,}\.)*([a-z]{2,})(,([_a-z0-9\-]+)(\.[_a-z0-9\-]+)*@([a-z0-9\-]{2,}\.)*([a-z]{2,}))*$')
pattern = re.compile(r'^([_a-z0-9\-]+)(\.[_a-z0-9\-]+)*@([a-z0-9\-]{1,}\.)*([a-z]{1,})(,([_a-z0-9\-]+)(\.[_a-z0-9\-]+)*@([a-z0-9\-]{1,}\.)*([a-z]{2,}))*$')
if not pattern.match(field.data.replace(" ", "")):
raise validators.ValidationError(self.message)

View File

@ -0,0 +1 @@
Forwarding emails user setting did not support 1 letter domains.