fix: validate url function

This commit is contained in:
Mir Arif Hasan
2024-01-04 16:41:24 +06:00
committed by Andrew Bastin
parent 9c00d6238e
commit b6b6acd2fa

View File

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