Javascript String isValidUrl()
isValidUrl()
String.prototype.isValidUrl = function() { var regex = /(http|https):\/\/(\w+:{0,1}\w*)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%!\-\/]))?/; return !!regex .test(this) }