marshmallow
marshmallow copied to clipboard
Added support for single character TLDs
Added support for single character TLDs for the email and domain validation. It will now support TLDs like a.a
. Refer #1844 for more detaills.
fixes: #1844
Thanks for the contribution and sorry for about the delay.
I have no objection to this, even if the SO answer underlines the fact that in practice there are currently no single character TLDs in the root.
Two things I'd like to check before merging:
- Does this also affect URL?
- What does Django do about this?
Also, please add yourself to AUTHORS.
@lafrech Added myself to authors list. Eventhough there are no single character TLDs currently available right now, this will make the library future proof.
Does this also affect URL?
yes, this regex will affect the domain validations as well since email and domain validation shares the same regex.
What does Django do about this?
I don't use django personally, I am not sure about this.
yes, this regex will affect the domain validations as well since email and domain validation shares the same regex.
I had a quick look and I thought it uses a different regex (see _regex_generator). I shall double-check.
I don't use django personally, I am not sure about this.
I don't either, but I remember some regexes being copied from there, and since I'm not proficient in regex, I find it nice to get them from there, or at least discuss the subject with them.