Bootstrapped validation for groups

This commit is contained in:
Philipp Czora
2018-08-01 13:40:54 +02:00
parent d7292dc60c
commit bc10ce587d
6 changed files with 77 additions and 29 deletions

View 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);
};