HostnameValidation error whenever i try to use with flask-wtf
There is a reason that HostnameValidation
does not appear in the documentation. From what I can see, it's only used in URL Validator for the host part of the URL. Its own docstring provides the necessary explanation:
Helper class for checking hostnames for validation.
This is not a validator in and of itself, and as such is not exported.
What you can do is to take the code of that class and write a custom WTForms validator for your specific case.