mirror of
https://github.com/outbackdingo/Mailu.git
synced 2026-01-28 10:19:35 +00:00
Merge #3096
3096: Fix 3095: fix the form validator of forwarding addresses r=nextgens a=nextgens ## What type of PR? bug-fix ## What does this PR do? Fix the form validator of forwarding addresses (allow uppercase). I don't think this warrants a backport but if you think it does add the label. ### Related issue(s) - closes #3095 ## Prerequisites Before we can consider review and merge, please make sure the following list is done and checked. If an entry in not applicable, you can check it or remove it from the list. - [ ] In case of feature or enhancement: documentation updated accordingly - [x] Unless it's docs or a minor change: add [changelog](https://mailu.io/master/contributors/workflow.html#changelog) entry file. Co-authored-by: Florent Daigniere <nextgens@freenetproject.org>
This commit is contained in:
@@ -38,7 +38,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\-]{1,}\.)*([a-z]{1,})(,([_a-z0-9\-\+]+)(\.[_a-z0-9\-\+]+)*@([a-z0-9\-]{1,}\.)*([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,}))*$', re.IGNORECASE)
|
||||
if not pattern.match(field.data.replace(" ", "")):
|
||||
raise validators.ValidationError(self.message)
|
||||
|
||||
|
||||
1
towncrier/newsfragments/3095.bugfix
Normal file
1
towncrier/newsfragments/3095.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Ensure that the form validator related to forwarding addresses allows for uppercase
|
||||
Reference in New Issue
Block a user