Skip to content

Commit fdd03ee

Browse files
committed
Use validate_email instead of email_re to validate email
- Legacy-Id: 6893
1 parent d1207bf commit fdd03ee

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ietf/secr/rolodex/forms.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from django import forms
22
from django.contrib.auth.models import User
33
from django.core.exceptions import ObjectDoesNotExist
4-
from django.core.validators import email_re
4+
from django.core.validators import validate_email
55

66
from ietf.person.models import Email, Person
77

@@ -83,8 +83,8 @@ def clean_address(self):
8383
cleaned_data = self.cleaned_data
8484
address = cleaned_data.get("address")
8585

86-
if address and not email_re.match(address):
87-
raise forms.ValidationError("Enter a valid email address")
86+
if address:
87+
validate_email(address)
8888

8989
return address
9090

0 commit comments

Comments
 (0)