showing results for - "validate url javascript"
Matteo
04 Jan 2018
1function validURL(str) {
2  var pattern = new RegExp('^(https?:\\/\\/)?'+ // protocol
3    '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+ // domain name
4    '((\\d{1,3}\\.){3}\\d{1,3}))'+ // OR ip (v4) address
5    '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+ // port and path
6    '(\\?[;&a-z\\d%_.~+=-]*)?'+ // query string
7    '(\\#[-a-z\\d_]*)?$','i'); // fragment locator
8  return !!pattern.test(str);
9}
Sarah
20 Jul 2020
1function isValidURL(string) {
2  var res = string.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g);
3  return (res !== null)
4};
5
6var testCase1 = "http://en.wikipedia.org/wiki/Procter_&_Gamble";
7
8alert(isValidURL(testCase1)); 
9
Martin
03 Mar 2017
1function isValidHttpUrl(string) {
2  let url;
3  
4  try {
5    url = new URL(string);
6  } catch (_) {
7    return false;  
8  }
9
10  return url.protocol === "http:" || url.protocol === "https:";
11}
Davide
12 May 2016
1function isValidHttpUrl(string) {
2  let url;
3  
4  try {
5    url = new URL(string);
6  } catch (_) {
7    return false;  
8  }
9
10  return url.protocol === "http:" || url.protocol === "https:";
11}
12
Laura
13 Apr 2019
1
2filter_var($url, FILTER_VALIDATE_URL);
3
4if (filter_var($url, FILTER_VALIDATE_URL) === FALSE) {
5    die('Not a valid!!');
6}
Sofia
22 Jan 2019
1validateurl
queries leading to this page
url validation in jsvalidate url in typescriptjs check if strig is urljs check if 23 in urlnode check if string is valid urljs if url contains stringurl match validate url javascriptjs how to check for urlif str is url jsvalid string on url jschek if string is urlis url javascripthow to check a specific part if url is vaid jshow to check if input url has http or https pythonhow to check if url contains string javascriptjs check whether its a link 3fhow to check if url has string javascriptlodash is valid urlcheck if a url contails a string jscheck if string is valid url javascriptsee if string is a urljs check if the string is urlcheck value is valid as http stringhow to validate urlcheck if string is urlcheck for url jshow to check string is valid url jsvalidator is urljs check what url was typed e2 80 9ccheck if string contains url javascriptjs test string if is a httpscheck if entire string is a url in start jsvalidate url htmlcheck url is valid or not javascriptjavascript check if nota a valid urlis url javascriptcheck if is a url in jsjs url is validhow to check if a string is a urljs check if www in url string 3fcheck whether string is a url jsurl validation jsreact string check if ir urljavascript is url checkbest way to check if a url is validreact checkvalid utlcheck if url contains string javascriptrgenerate valid url 27s in javascriptcheck if url contains string in jsvalid url 2b javascriptjavascript check if urk is validvalid url in javascriptverify url javascriptjavascript url validatcheck link validity jsuri validate jsjs check if is var is urljs check url if it contain stringvalidate all url jsvalidate url in jaavscriptmake correct url using javascriptis url validcheck for url in a stringcheck the url input in javascripturl validation javascriptcheck if a string is a urljavascript regex check if valid urlurl validation test javascripthow to valid a url in jshow to check a url is valid or not in javascriptjavascript make url validcheck if urljavascript is url validcheck valid urlurl validator online javascript 2a is not a valid url jscheck for valid url javascriptdetect is urljs is string urljqery check isvalidurlreact check if string is urlhow to validate a url javascriptfunction used to validate urlcheck if is valid url javascripthow to determine if url is validnode check if it is a valid urljs if string contains urlhow to check a url in javascripthow to check if a string is a url nodeadd http only before valid url in jsjavascript url validategiven string is url determine ifjavascript for url validationcheck if a string is a url vuejavascript detect string if urlvalidator check if string can be in urlhow to check for a valid url in javascripthow to check if a string is url or notcheck if strong is urlcheck if string is url javascriptcheck if a url is valid in jshow to check if url contains stringcheck url has data reactregex check if string is valid url javascriptcheck if url has a stringvalidate a url in javascriptjs function to validate urlcheck if its uri jslodash check if string is urivalidate string is url javascriptcheck string is url jscheck if url contains string jsjs test if url existsjavascript check if input is urlvalid urlvalidate link javascriptcheck url is validvalidator js website urljavascript verify is valid url 2a 27is not a valid url jsjavascript validate url existshow to validate url in javascript vanilla jsvalidating url in jscheck a valid urlisvalidurl javascriptjs check if valid urljavascript check to see if a string is a urlhow to validate a url with javascript in htmljavascript ensure url is validcheck if string is url or not jsvalid url javascriptjs if url containsjs check string is urlcheck url is valid in jscheck if something is an url javascriptcheck if is valid url jsif url contains string jshow to check given string is website link or not in angularhow to check if you are on the right url in jscheck if string is an url regex jsjs isurlhow to check url in string using javascripthow to check if value is a website adrsse with javascriptjavascript if url containshow to read valid url in javascript new url 28 29validate url javascriptis valid url javascriptget if string contains url javascriptcheck if a string is urldetect url in string javascriptsee if string is an urljavascript check if is valid urlhow to check for valid ur 3b in node jsjavascript if is urlhtml input check if proper urlcheck url fpr signs javascriptcheck whether string is a ur 3b react test for unvalid urlcheck for url in a string javascript verify urlvalidate if string is link javascriptjavascript correct urlcheck if input is valid url javascript without regexjsverify if url have protocolscheck is url javascriptnode check if url is validcheck url in string javascriptcheck if string is a url jscheck current url contains in javascriptjavascript check url is validcheck if string is url in node jsverify url is formatted correctly in typescripthow to check for a valid url in jsjavascript is valid url 3fhow to check the url is validif urltest valid url javascriptjavascript check if a url is a urlhow to check if url contains string jsjavascript check if a string is a urljavascript check if url containsif url contains javascriptjs check if url contains stringjs is url validis a valid url javascrcheck if js string is url with validatornew url in javascript invalid url check conditioncheck if link javascripttypescript check valid urljavascript how to know if is a urlcheck if url contains a string javascriptja string check urlhow to check if string is present in url or not jshow to check whether url is valid or not in javascripthow to check url is valid or not in javascriptjavascript check https in urlinvalid link validation in jshow to check url validity javascriptvalidate url argument jsdetect if string is urlcheck if string is url in javascriptvalidate string is url angular 10 typescripthow javascript can check urljs detect url in stringhow to check the valid urljs valid urlhow to check if its url in javascriptjavascript return valid part of urljs test if valid urlregex to check if given text is url javascripthow to check if valid urlcheck if string is url reactjavascript check if string is urljavascript function check urljavascript valid urljavascript check if item is urljquery check if string is urlcheck string is html or urljavascript code to check valid urlisurl 28 29 in javascripthow to validate link in javascriptjavascript string if urlvalidation of an url using validate jscheck valid urivalid url stringfind valid urlvalidate if url is validjavascript validate url return true if valid urlhow to check if a url is valid in javascriptcheck if string is url or not javascripthot to valid url jsif something is a urljavascript is string urladd http only before valid url in javascriptcheck if string is urifind if url in stringcheck if string is url typescriptjs check if url workshow to check if url is a valid url by javascripthow to check for a matched string in url javascriptjs check if text is a valid urljavascript valid urljs check if string is urihow to check if url is valid javascriptcheck if text is a link jsjavascript check if a url is validcheck if a javascript string is a url js validate url pathcheck if input is valid url javascriptjavascript see if something is a urlcheck url validationjavascript check if something is a urlhow to know if string is urlhow to check if a user add a valid url in jsjavasciprt validate urlnew url 28 validate urlbest javascript url validatorcheck if string is a url in start jsjavascript show link if string has urlcheck if url has string javascripthow to check is a string is a valid urljs check string urlchek is url in jsif url javascriptjs check if urljavascript check if url is reachable and contains datajavascript validate url inputhow to check if the description field has url in javascripthow to check for the valid url format in javascriptcheck if string contains url javascriptreact check if url address is validtypescript how to know if a string is an urljs cheeck dfor valid urltypescript check if string is valid urlcheck to see if the url is valid or not in jsif url has javascriptcheck if string is url onlinejs check if url is validis valid url jshow to check its url or or not in javascriptcheck url with javascriptis this a valid urlhow to check if a string is avalid url in javascripthow to check if the url validator jsjs check url is validurl string checkercheck is is valid url javascriptcheck url is valid or not in javascriptcheck a url or not on stringjavascript test if link is validcheck if url has string jsjs validurlhow to check if url is valid in javascriptvalidate url in javascriptcheck if string is url regex jsjs check if url is availablecheck if url is valid jscheck if string is valid url pathnamecheck if url contains 3f symbol javascriptregex to validate website url javascripturl validator javascriptjavascript if page url ishow to check whether url is valid or not in typescriptif something is in urlnodejs check if url is validurl string problem jshow to check if the url is validlodash check if string is urljavascript how to check if url is validjavascript check if url contains paramjavascript check url containsjavascript regex to verify http urlhow to check if something is a valid url javascriptcheck if string is a url nodejs check if text contains a url or mediahow to check url validation in javavascriptjs check if url contains a string javascript validate urlverify input is valid url javascriptcheck valid url in javascriptcheck if text is a url jjavascript current url containscheck valid url jsjavascript check if urlvalidate website url in javascripthow to check vaild url in jsreact check if text is linkjavascript check if url has stringjavascript validate linksjavascript get valid urlhow to check if string is urlcheck url in jscheck if a string is a valid url pathnamecheck if url is correct javascriptcheck if string is a url node jshow to validate url in javascriptangular check if stirng is urlhow to check current url contains string in javascriptjavascript validate linksee if is valid url jshow to check if the page url contains string javascriptcheck if link is valid javascriptjavascript check url how to validate urnjavascript how to tell if a url is valid or notjs check if url has 23check url jsidentify valid url jsjs check if strning is urljavascript validate that url is reachacheck if string is uri jshow to check for url stringis valid urlcheck if a url is valid with ext in jstypescript check if is urlcheck if url is valid online javascripthow to check if string is a link in jsjavascript if current url containsverify if text is url javascriptcheck the url is validcheck if a valid link jscheck for url in javascriptjavascript check if valid urlcheck if a string is a valid urlnodejs find if a string is urlnode check if string is a valid urlcheck string contians url in jscheck url validation in javascriptjquery check is urljs is string is urlhow to check input true url javascriptjavascript is urlcheck for a valid url or hostname jsjavascript check is urlvalid url jscheck if string is link javascriptcheck website url is valid in jsvalidate website jscheck if website url or not es6how to check if a url is validcheck url for http jsjavascript check if url contains 2fhow to validate a url in javascriptcheck if it 27s a url jscheck valid url jscheck for web links in string javascripthow to check url contains string in javascripthow to make sure a url is valid javascriptjs check if url is 2ajavascript check string in urljavscript check if string is urlis url in jshow to check for url string javascrptcheck valid url javascriptjs how check url valid or notcheck string is url javascriptcheck string is url or not in javascripthow to check if something is a valid uri javascriptcheck if text is a url jshow to check if something is a urljavascript url checker methodurl validatervalidate is valid url jscheck if is url javascriptvalidate https url javascripthow to check string is url or not in javascripthow to check string is url in jsjs check url truecheck url javascriptcheck a url is validcheck url format in javascriptcheck string urlhow to check valid url in javascriptcheck if is url es6javascript check url is valid or notjavascript validate https urltest valid https url javascripturl javascript validationfunction to check if url is validvalidate a valid urlvalidate string as website url javascriptregex check if link javascriptjs is valid urljs string is urlhow to check a link is valid with jsjs check if string is valid urljavascript determine if string is valid urlcheck with javascript if url containscheck if in an url there is a patch jsvalid url javascript functionjavascript get url 3fvalidjavascript how to check if string is valid urlcheck uri is validjavascript validate url examplejavascript if website addresse is truevalidate url jscheck if args is url jsjs validate urltypescript check if is valid urlcheck if string on current url javascriptjavascript check if url validhow to check if a variable is a url in javascriptcheck whether string is url in javascripthow to check if a string is urlhow to a check a url in javascriptif element are in url javascriptjs string url validatehow to url is not stringjs regex to check if text is valid urljs check if arg is urljs check if url is email addressvalidate urlhow to know if a string is a url in javascriptjs valide urlhow to check given string is a link or not in angularjs check if string is urljavascript check url contains stringcheck if url contains string javascriptis url jsjavascript validate domain with urihow ot check if a url is validvalidador de url javascriptcheck url validity jscan you validate a url with jshow to get if from url in jsjavascript check if string is linkhow to check if the url contains a given string in javascripthow to check url is valid or notcheck if url is correct jscheck if string in url jscheck if url valid javascriptcheck if url is valid javascriptjavascript function to check valid urljs check is urljavascript check valid urlvalidate url javascript on inputcheck if url is valid stringjavascript if url containshow to know if given url is valid javascriptcheck variable is url javascripthow to check string for urlcheck if valid url es6validate a string as urlcheck for an url jsjs url has stringreact how to check if a url is onlineurl validator jshow to check if text is linkjs check if url in string 3d truecheck if string is a url react nativehow to check if url is valid valid url check javascriptif url entered javascriptif url contains jsjs check url validvalidate js urilcheck is is valid urljavascript valide urlnode check if valid urlto find if url is validhow to figure out if a string is url in javascriptif url com valid javascriptjavascript check if string is a urlcheck if url javascriptjavascript check url stringjavascript check what the url isdetec if a string is linkjavascript check if link is validcheck if url contains text javascriptjavascript if string is urlcheck if a string is an urlnode check if string is urlnodejs check if string is urlhow to check if the url of a page exist jshow to check for a valid url format in jsjavascript check if an url inage is validcheck if url is valid reactcheck if valid url urilibcheck an url jsjavascript check url is valid httphow to check string is url or not in react native javascript test if string is urlis link check jshow to check in string is a url in jsvalidation url javascriptcheck valid url in jsjavascript check if string is a valid urlvalid url check in javascriptif url contains string javascripttest if a url is open jscheck url for string javascriptjavascript validate urljs input url validationcheck if is valid urljavascript check if url isjs check if string is utlis valid website check in javascriptcheck if string is url jsregex check if valid url in jsurl validator in javascripthow ot hcek is string is a url or nothow to validate url using javascriptjs validate if is urlcheck or not url jscheck if a string is valid urlcehck if current url contains jstypescript validate uri routejs check if string is urkhow to check if text is a url in js 3fcheck url is valid jsvalidate url domain name in jsjs check if url containsjs check if url is reallink validation in javascriptreact check if url is validhow to validate url format in javascriptjs validate url structurejavascript check if current url contains stringcheck if string is a url reactdetect if is url javascriptjavascript if url is 27 2a 27 is not a valid url jsjs check if string is a urlurl validation in javascriptjavascript detect string is a urljs url validationhow to check if a var is a url in javascriptcheck if valid urlcheck string for url jshow to check if a url have a specific stringcheck https link jscheck if string has url javascripthow to check a valid url in jscheck if url contains javascriptcheck if url jscode to check if something is a valid urlcheck if something is an url javascriptvalidate if string is url angular 10 typescriptvalidate a url javascripthow to validate the url format 2b javascripthwo to check a url is validtest if string is uri javascriptcheck if a url contails a stringcheck string if url jsjavascript url validatorcheck if url is valid onlinejs check url containses6 check for urlverify entered url javascriptvalidate string is url typescriptjs test if variable is urlvalidate a urljs detect string is urljavascript url validationcheck valid base url javascriptjs check if value is urljs how to see if url contains a stringhtml validate urlhow to check if a string is url in javascriptcheck string is urlcheck url is valid or nothow to validate whether given link has a valid document or not javascriptcheck if a string is a url javascriptjavascript check is valid urlcheck if url has specific string jsnode js is a valid urlcheck if a url is validcheck url in javascriptcheck if a valid urlhow to check if it is a link or not in javascriptjavascript check for urlhow to validate url in validate jslodash isurl httpscheck whether string is a url multilanguges jsjavascript validate a valid urljs url validadtorjs find url inputnodejs check if the url is validcheck if url exist javascriptjs check valid urlvalidate a valid web address javascriptjs see if string is a urlcheck url javascript validationcheck if it is valid urlstring validate with urljs check uri is validjs check if is urljavascript check if string is uricheck if valid url javascriptcheck if a url is valid javascriptif url contains one string then how to check in jsverify url jshow to check html is link jsjavascript check if the string is urljavascript url is valideurl syntax checkerif url is javascriptjs if url ishow to validate if a input start with https 3a 2f 2fjavascript is valid urlhow to check if url contains a paramter in javascriptangularjs regex link checkerjavascript check if url contains stringjavascript check if url is validcheck the validation of url javascriptjavascript validate new urlcheck if url is validfunction check if url contains stringjavascript check if url exists javascript check if text is urlhow to find string is web url or not in javascriptis 3d 3d valid urljava script check valid url or notcheck if url is correctly formatted typescripthow to check url string jscheck for valid urlvalidate url with javascriptjavascript url checkvalid url format javascriptverify if string is link javascriptcheck if js string is urlcheck if the url is valid in javascriptvalidate the urljavascript check if url containjs is urlvalidate url javascript