Allow links in Editor without http/https (#124)

This commit is contained in:
Ilya Y 2023-07-17 22:11:14 +03:00 committed by GitHub
parent aeba020390
commit c647cf5a75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,3 @@
export const validateUrl = (value: string) => { export const validateUrl = (value: string) => {
return /^(http|https):\/\/[^ "]+$/.test(value) return /^((http|https):\/\/)?[^ "]+$/.test(value)
} }