diff --git a/src/lib/utils/urlvalid.ts b/src/lib/utils/urlvalid.ts new file mode 100644 index 0000000..9e279c4 --- /dev/null +++ b/src/lib/utils/urlvalid.ts @@ -0,0 +1,4 @@ +export function isValidURL(url: string): boolean { + const urlPattern = /^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/; + return urlPattern.test(url); +} \ No newline at end of file