# Path: td_biblio/models.py
# class Author(AbstractHuman):
#     """Entry author"""
# 
#     class Meta:
#         ordering = ("last_name", "first_name")
#         verbose_name = _("Author")
#         verbose_name_plural = _("Authors")


from operator import methodcaller
from django import forms
from django.core.validators import RegexValidator
from django.utils.translation import ugettext_lazy as _
from td_biblio.models import Author



DOI_REGEX = r"(10[.][0-9]{4,}(?:[.][0-9]+)*/(?:(?![\"&'<>])\S)+)"
doi_validator = RegexValidator(
    DOI_REGEX, _("One (or more) DOI is not valid"), "invalid"
)

PMID_REGEX = r"^-?\d+\Z"
pmid_validator = RegexValidator(
    PMID_REGEX, _("One (or more) PMID is not valid"), "invalid"
)



# Path: td_biblio/models.py
# class Author(AbstractHuman):
#     """Entry author"""
# 
#     class Meta:
#         ordering = ("last_name", "first_name")
#         verbose_name = _("Author")
#         verbose_name_plural = _("Authors")


# Path: td_biblio/forms.py
from operator import methodcaller
from django import forms
from django.core.validators import RegexValidator
from django.utils.translation import ugettext_lazy as _
from td_biblio.models import Author




DOI_REGEX = r"(10[.][0-9]{4,}(?:[.][0-9]+)*/(?:(?![\"&'<>])\S)+)"
doi_validator = RegexValidator(
    DOI_REGEX, _("One (or more) DOI is not valid"), "invalid"
)

PMID_REGEX = r"^-?\d+\Z"
pmid_validator = RegexValidator(
    PMID_REGEX, _("One (or more) PMID is not valid"), "invalid"
)



def text_to_list(raw):