mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-25 02:34:31 +01:00
Merge pull request #23 from jqueuniet/fix_email_regexp
Change the email regular expression to fix a few validation issues
This commit is contained in:
commit
3b58f1464e
@ -71,7 +71,7 @@ class Attributes:
|
|||||||
raise MissingUserKey()
|
raise MissingUserKey()
|
||||||
|
|
||||||
def _is_email(self, email):
|
def _is_email(self, email):
|
||||||
pattern = r'[\.\w]{1,}[@]\w+[.]\w+'
|
pattern = r'[\+\.\w]+@[-\.\w]+\.\w+'
|
||||||
if re.match(pattern, email):
|
if re.match(pattern, email):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user