Skip to content
Snippets Groups Projects
Commit 2224667b authored by Bjarke Madsen's avatar Bjarke Madsen
Browse files

validate any type of URL

parent 941555e9
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ function validateWebsiteUrl(params) { ...@@ -23,7 +23,7 @@ function validateWebsiteUrl(params) {
} }
try { try {
const url = new URL(value); const url = new URL(value);
return url.protocol === 'http:' || url.protocol === 'https:'; return !!url
} catch (err) { } catch (err) {
return false; return false;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment