Add hostname validation
Previously validateDomain()
function was used for hostname validations
but was weak in a chain of validations, for example, domain -> ipv4
as it accepts invalid IPv4 addresses.
So we had to split it, improve the domain name RegEx pattern and add a hostname validation pattern.
Part of reforis-openvpn!55 (merged) && reforis!303 (merged) is dependant
Edited by Aleksandr Gumroian