code: def validate_email_domain(email):
      
      try:
          domain = email.split('@', 1)[1].lower().strip()
      except IndexError:
          return
      if domain in dju_settings.DJU_EMAIL_DOMAIN_BLACK_LIST:
          raise ValidationError(_(u'Email with domain "%(domain)s" is disallowed.'),
                                code='banned_domain', params={'domain': domain})
docs: Validates email domain by blacklist.