Mind review findings

This commit is contained in:
Eduard Heimbuch
2020-12-02 10:42:26 +01:00
parent e7b7bf5b0f
commit 7db33d2e65
18 changed files with 152 additions and 351 deletions

View File

@@ -50,7 +50,7 @@ export const isPathValid = (path: string) => {
return pathRegex.test(path);
};
const urlRegex = /[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/;
const urlRegex = /^(ftp|https?):\/\/[^\s$.?#].[^\s]*$/;
export const isUrlValid = (url: string) => {
return urlRegex.test(url);