Fixes #8045 - Validate domain names per RFC 1035

From [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt):
"The labels must follow the rules for ARPANET host names.  They must
start with a letter, end with a letter or digit, and have as interior
characters only letters, digits, and hyphen.  There are also some
restrictions on the length.  Labels must be 63 characters or less."

However, to prevent issues with users defining non-standard names, I decided only to make sure each label is under 63 characters, the entire name is under 256, and that it only contains letters, digits and hyphens.
I think this validator is also useful in other places, i.e. fqdn validation