python-validators / validators

Python Data Validation for Humans™.
MIT License
977 stars 155 forks source link

Bug, hostname with trailing dot throws exception #204

Closed plejon closed 1 year ago

plejon commented 2 years ago

Throws error when hostnames has trailing dot. Example usage is for pushing records to Azure DNS.

import validators
validators.domain('example.com.')
ValidationFailure(func=domain, args={'value': 'example.com.'})
validators.__version__
'0.18.2'
paulmillar commented 1 year ago

Just to mention, a web page dedicated to trailing dots in domain name. There is also this related Stack Overflow question. Both make it clear that a URL, where the authority part has a FQDN with a final dot, is a valid URL.

yozachar commented 1 year ago

duplicate of #124