code: function(url) {
      if (url) {
        var urlPattern = /^(http|ftp|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&amp;:\/~+#-|]*[\w@?^=%&amp;\/~+#-])?$/
        return String(url).match(urlPattern) != null ? true : false;
      }
  
      return false;
    }
docs: Return true if the provided URL is valid