From 7458d0668743fa9e2f9a2458a1f6b081e7d2dc65 Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Tue, 2 Mar 2021 11:44:42 +0100 Subject: [PATCH] added email field validation --- evapp/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evapp/models.py b/evapp/models.py index bda0895..3a19031 100644 --- a/evapp/models.py +++ b/evapp/models.py @@ -47,7 +47,7 @@ class Employee(models.Model): firstname = models.CharField(max_length=50, verbose_name="Vorname") lastname = models.CharField(max_length=50, verbose_name="Nachname") intern = models.BooleanField(verbose_name='Interne_r Mitarbeiter_in?', default=True) - email = models.CharField(max_length=50, verbose_name="E-Mail-Adresse") + email = models.EmailField(max_length=50, verbose_name="E-Mail-Adresse") department = models.CharField(max_length=5, choices=DEPARTMENT_CHOICES.items()) team = models.CharField(max_length=20, null=True, blank=True) # TODO? besser als choices?