So, I'm developing a simple URL shortener in Symfony2 - one of the things that is required is the input must be a valid URL.
So I've set everything up and it's being validated, but it doesn't validate the TLD! It will pass things through such as "A" as being a valid domain!
What's going on?
You do not only want to validate the TLD, but also if the TLD is within the public suffix list:
Also please see a related question for a list of libraries: Get the subdomain from a URL