[fix] validate_email_add
This commit is contained in:
parent
0d4c5693d8
commit
69697bc172
1 changed files with 4 additions and 2 deletions
|
|
@ -78,14 +78,16 @@ def validate_email_add(email_str, throw=False):
|
|||
if not match:
|
||||
return False
|
||||
|
||||
matched = match.group(0)
|
||||
|
||||
if match:
|
||||
match = match.group(0)==email.lower()
|
||||
match = matched==email.lower()
|
||||
|
||||
if not match and throw:
|
||||
frappe.throw(frappe._("{0} is not a valid email id").format(email),
|
||||
frappe.InvalidEmailAddressError)
|
||||
|
||||
return email.lower()
|
||||
return matched
|
||||
|
||||
def random_string(length):
|
||||
"""generate a random string"""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue