# Path: post_office/validators.py
# def validate_comma_separated_emails(value):
#     """
#     Validate every email address in a comma separated list of emails.
#     """
#     if not isinstance(value, (tuple, list)):
#         raise ValidationError('Email list must be a list/tuple.')
# 
#     for email in value:
#         try:
#             validate_email_with_name(email)
#         except ValidationError:
#             raise ValidationError('Invalid email: %s' % email, code='invalid')


from django.db.models import TextField
from django.utils.translation import gettext_lazy as _
from .validators import validate_comma_separated_emails
        from south.modelsinspector import introspector



class CommaSeparatedEmailField(TextField):
    default_validators = [validate_comma_separated_emails]
    description = _("Comma-separated emails")

    def __init__(self, *args, **kwargs):
        kwargs['blank'] = True
        super().__init__(*args, **kwargs)


# Path: post_office/validators.py
# def validate_comma_separated_emails(value):
#     """
#     Validate every email address in a comma separated list of emails.
#     """
#     if not isinstance(value, (tuple, list)):
#         raise ValidationError('Email list must be a list/tuple.')
# 
#     for email in value:
#         try:
#             validate_email_with_name(email)
#         except ValidationError:
#             raise ValidationError('Invalid email: %s' % email, code='invalid')


# Path: post_office/fields.py
from django.db.models import TextField
from django.utils.translation import gettext_lazy as _
from .validators import validate_comma_separated_emails
        from south.modelsinspector import introspector




class CommaSeparatedEmailField(TextField):
    default_validators = [validate_comma_separated_emails]
    description = _("Comma-separated emails")

    def __init__(self, *args, **kwargs):
        kwargs['blank'] = True
        super().__init__(*args, **kwargs)


    def formfield(self, **kwargs):