use new regex pattern for permissions

This commit is contained in:
Maren Süwer
2018-10-02 15:27:51 +02:00
parent a120b5af62
commit b7ed7e44dd
10 changed files with 153 additions and 81 deletions

View File

@@ -1,5 +1,5 @@
// @flow
const nameRegex = /^([A-z0-9.\-_@]|[^ ]([A-z0-9.\-_@ ]*[A-z0-9.\-_@]|[^\s])?)$/;
const nameRegex = /^[A-Za-z0-9\.\-_][A-Za-z0-9\.\-_@]*$/;
export const isNameValid = (name: string) => {
return nameRegex.test(name);