Hi,

Say, I have an email field in a model and need to add an email validator
for email domain validation.
For this, allowlist property needs to be append to email validator like:

email = models.EmailField(
    validators=[
        EmailValidator(allowlist=['example1.com', 'example2.com',...])
    ]
)

Can I dynamically fetch domains from another model and assign to allowlist?
"allowlist" must be altered instantly if related domain list model records
are changed.

Regards,
Sencer HAMARAT

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACp8TZgUP9PFB4Rgbhc2sPBvUZ56fy-HFB5AuAxCs8bejo-ahQ%40mail.gmail.com.

Reply via email to