mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 08:55:44 +01:00
Bootstrapped validation for groups
This commit is contained in:
10
scm-ui/src/groups/components/groupValidation.js
Normal file
10
scm-ui/src/groups/components/groupValidation.js
Normal file
@@ -0,0 +1,10 @@
|
||||
// @flow
|
||||
|
||||
//TODO: How should a group be validated
|
||||
//TODO: Tests!
|
||||
|
||||
const nameRegex = /^([A-z0-9.\-_@]|[^ ]([A-z0-9.\-_@ ]*[A-z0-9.\-_@]|[^\s])?)$/;
|
||||
|
||||
export const isNameValid = (name: string) => {
|
||||
return nameRegex.test(name);
|
||||
};
|
||||
Reference in New Issue
Block a user