Skip to content

Commit

Permalink
fix: allow longer TLD as reported in #235
Browse files Browse the repository at this point in the history
  • Loading branch information
Raj Nandan Sharma authored and Raj Nandan Sharma committed Feb 1, 2025
1 parent 76ce14e commit 7be9c62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/server/controllers/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

export function IsValidURL(url) {
const regex =
/^(https?:\/\/)?((localhost|[\da-z.-]+\.[a-z]{2,6})(:[0-9]{1,5})?)?(\/[\w .-]*)*\/?$/i;
/^(https?:\/\/)?((localhost|[\da-z.-]+\.[a-z]{2,10})(:[0-9]{1,5})?)?(\/[\w .-]*)*\/?$/i;
return regex.test(url);
}

Expand Down

0 comments on commit 7be9c62

Please sign in to comment.