python model field django to validate email code example
Example 1: email validation using django
from django import forms
class MyForm(forms.Form):
even_field = forms.IntegerField(validators=[validate_even])
Example 2: email validation using django
from django.db import models
class MyModel(models.Model):
even_field = models.IntegerField(validators=[validate_even])