mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-07 05:55:44 +01:00
improve url regex
This commit is contained in:
@@ -50,7 +50,7 @@ export const isPathValid = (path: string) => {
|
||||
return pathRegex.test(path);
|
||||
};
|
||||
|
||||
const urlRegex = /^(ssh|ftp|https?):\/\/[^\s$.?#].[^\s]*$/;
|
||||
const urlRegex = /^[A-Za-z0-9]+:\/\/[^\s$.?#].[^\s]*$/;
|
||||
|
||||
export const isUrlValid = (url: string) => {
|
||||
return urlRegex.test(url);
|
||||
|
||||
Reference in New Issue
Block a user