invite email modal updated

This commit is contained in:
Anik Ghosh
2022-03-15 20:31:54 +05:30
parent ab01ff249d
commit e126bfddad
2 changed files with 64 additions and 16 deletions

View File

@@ -75,3 +75,14 @@ export const validateEmail = (email: string) => {
? true
: false;
};
export const validateURI = (uri: string) => {
if (!uri || uri === '') return true;
return uri
.toLowerCase()
.match(
/(?:^|\s)((https?:\/\/)?(?:localhost|[\w-]+(?:\.[\w-]+)+)(:\d+)?(\/\S*)?)/
)
? true
: false;
};