Skip to content

Commit 70830e8

Browse files
committed
Added email address validation for the Email.address field, now that we're not putting dummy addresses in it.
- Legacy-Id: 13739
1 parent 0d120fb commit 70830e8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ietf/person/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
from django.conf import settings
1111

12+
from django.core.validators import validate_email
1213
from django.db import models
1314
from django.contrib.auth.models import User
1415
from django.template.loader import render_to_string
@@ -224,7 +225,7 @@ class Meta:
224225
verbose_name_plural = "Aliases"
225226

226227
class Email(models.Model):
227-
address = models.CharField(max_length=64, primary_key=True)
228+
address = models.CharField(max_length=64, primary_key=True, validators=[validate_email])
228229
person = models.ForeignKey(Person, null=True)
229230
time = models.DateTimeField(auto_now_add=True)
230231
primary = models.BooleanField(default=False)

0 commit comments

Comments
 (0)