mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 08:55:44 +01:00
align validation of repository name and namespace
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
// @flow
|
||||
import { validation } from "@scm-manager/ui-components";
|
||||
|
||||
const nameRegex = /(?!^\.\.$)(?!^\.$)(?!.*[\\\[\]])^[A-z0-9\.][A-z0-9\.\-_]*$/;
|
||||
|
||||
export const isNameValid = (name: string) => {
|
||||
return validation.isNameValid(name);
|
||||
return nameRegex.test(name);
|
||||
};
|
||||
|
||||
export function isContactValid(mail: string) {
|
||||
|
||||
Reference in New Issue
Block a user