I understand the reasoning for the error message, I'm just a little unsure about the wording of it:
Links cannot contain 'localhost' (try a non-numeric domain)
Ultimately, you're adding a link to your post that nobody will be able to click on; all it is saying is: it doesn't make much sense as a hyper-link, but will be fine for example as code:
We have, however, changed the error message to:
I would use the following error message:
This should make clear the user needs to try with another domain that is not numeric.
The error message has been changed as follows:
That at least is the message you get when the URL contains localhost as domain name.