IMAP folder names may contain characters outside of \w: [a-zA-Z0-9]

main
Florent Daigniere 2 years ago
parent 79f01c4e33
commit c634b9ac04

@ -47,7 +47,7 @@ class MultipleFoldersVerify(object):
self.message = message
def __call__(self, form, field):
pattern = re.compile(r'^\w+(\s*,\s*\w+)*$')
pattern = re.compile(r'^[^,]+(,[^,]+)*$')
if not pattern.match(field.data.replace(" ", "")):
raise validators.ValidationError(self.message)

Loading…
Cancel
Save