validate the length of an url