mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-07 05:55:44 +01:00
refactor UI
This commit is contained in:
@@ -49,3 +49,9 @@ const pathRegex = /^((?!\/{2,}).)*$/;
|
||||
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()@:%_\+.~#?&//=]*)/;
|
||||
|
||||
export const isUrlValid = (url: string) => {
|
||||
return urlRegex.test(url);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user