$ python
Python 2.7.5 (default, Nov 6 2016, 00:28:07)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import validators
>>> print validators.__version__
0.11.2
>>> validators.domain("ietf..org")
ValidationFailure(func=domain, args={'value': 'ietf..org'})
>>> validators.domain("www..ietf.org")
True
>>>
$ host www..ietf.org
host: 'www..ietf.org' is not a legal name (unexpected end of input)
$ dig www..ietf.org
dig: 'www..ietf.org' is not a legal name (unexpected end of input)
Double dots, which seem to be illegal in dns names [1], are not rejected unless they are between the last two labels.
[1] RFC 1912:
DNS domain names consist of "labels" separated by single dots.
Double dots, which seem to be illegal in dns names [1], are not rejected unless they are between the last two labels.
[1] RFC 1912: