MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / __init__

Method __init__

mongoengine/fields.py:248–265  ·  view source on GitHub ↗

:param domain_whitelist: (optional) list of valid domain names applied during validation :param allow_utf8_user: Allow user part of the email to contain utf8 char :param allow_ip_domain: Allow domain part of the email to be an IPv4 or IPv6 address :param kwargs: Keyw

(
        self,
        domain_whitelist=None,
        allow_utf8_user=False,
        allow_ip_domain=False,
        *args,
        **kwargs,
    )

Source from the content-addressed store, hash-verified

246 error_msg = "Invalid email address: %s"
247
248 def __init__(
249 self,
250 domain_whitelist=None,
251 allow_utf8_user=False,
252 allow_ip_domain=False,
253 *args,
254 **kwargs,
255 ):
256 """
257 :param domain_whitelist: (optional) list of valid domain names applied during validation
258 :param allow_utf8_user: Allow user part of the email to contain utf8 char
259 :param allow_ip_domain: Allow domain part of the email to be an IPv4 or IPv6 address
260 :param kwargs: Keyword arguments passed into the parent :class:`~mongoengine.StringField`
261 """
262 self.domain_whitelist = domain_whitelist or []
263 self.allow_utf8_user = allow_utf8_user
264 self.allow_ip_domain = allow_ip_domain
265 super().__init__(*args, **kwargs)
266
267 def validate_user_part(self, user_part):
268 """Validate the user part of the email address. Return True if

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected