fix: url regex update

This commit is contained in:
Mir Arif Hasan
2024-01-04 19:14:51 +06:00
committed by Andrew Bastin
parent 1be466efcd
commit 2ba79a043b

View File

@@ -189,7 +189,7 @@ export const validateSMTPUrl = (url: string) => {
* @returns boolean * @returns boolean
*/ */
export const validateUrl = (url: string) => { export const validateUrl = (url: string) => {
const urlRegex = /^(https?):\/\/(-\.)?([^\s\/?\.#-]+\.?)+(\/[^\s]*)?$/; const urlRegex = /^(http|https):\/\/[^ "]+$/;
return urlRegex.test(url); return urlRegex.test(url);
}; };