July 22, 2007
So I’ve been working on a side app that connects to remote servers. While writing validation code for inputs, I came across an interesting dilemma. I’d like to validate an address input to be valid- be it a hostname, domainname, or ip address. Unfortunately it’s not as simple as it sounds.
According to the domain name RFC, section 3.5 domain names must start with a letter, end with a letter or number, and can have letters, numbers or hyphens in between.
read more