Ver código fonte

[fix] validate_email_add

version-14
Rushabh Mehta 10 anos atrás
pai
commit
69697bc172
1 arquivos alterados com 4 adições e 2 exclusões
  1. +4
    -2
      frappe/utils/__init__.py

+ 4
- 2
frappe/utils/__init__.py Ver arquivo

@@ -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"""


Carregando…
Cancelar
Salvar