add mailaccount check

This commit is contained in:
2020-10-28 21:32:44 +00:00
parent 428d0072ad
commit a7e778b217

View File

@@ -129,12 +129,17 @@ class Member(models.Model):
def clean(self):
if self.image.height < 150 or self.image.width < 150:
raise ValidationError(
_('Das Bild ist zu klein. (Höhe: {}, Breite: {})').format(
_("Das Bild ist zu klein. (Höhe: {}, Breite: {})").format(
self.image.height,
self.image.width
)
)
if not "@fet.at" in self.mailaccount:
raise ValidationError(
_("In der Mailadresse fehlt die Domäne.")
)
def __str__(self):
return self.firstname + " " + self.surname