`validators.domain` should optionally allow underscores
Closed this issue · 2 comments
validators/src/validators/domain.py
Line 90 in e6d50ba
At the moment underscores are not valid in the subdomains despite them being valid in the real world depending on the use case. The sense of 'valid' is relative to who you ask within networking.
There should be a way to optionally allow subdomains with underscores as valid and therefore set the logic to something like: + rf"(?:[a-z0-9_-{service_record}]{{0,61}}"
Before someone bangs on about RFC, the history of underscores in RFC has a mixed history that i'm well aware of. The fact is, all the DNS resolvers of the world accept subdomains with underscores and they have to because there many critical subdomains around the world still use underscore subdomains.
Hi @oregonpillow,
See: #364 (comment)
Thank you very much! Sorry i didn't find that previously.