Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

email validation using django

from django.core.exceptions import ValidationError
from django.utils.translation import gettext_lazy as _

def validate_even(value):
    if value % 2 != 0:
        raise ValidationError(
            _('%(value)s is not an even number'),
            params={'value': value},
        )
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged: #email #validation #django
ADD COMMENT
Topic
Name
9+5 =