implemented repository create form

This commit is contained in:
Sebastian Sdorra
2018-08-02 16:09:58 +02:00
parent e675bcc0fd
commit 9b62d19df5
23 changed files with 838 additions and 129 deletions

View File

@@ -1,24 +1,11 @@
// @flow
const nameRegex = /^([A-z0-9.\-_@]|[^ ]([A-z0-9.\-_@ ]*[A-z0-9.\-_@]|[^\s])?)$/;
export const isNameValid = (name: string) => {
return nameRegex.test(name);
};
export const isDisplayNameValid = (displayName: string) => {
if (displayName) {
return true;
}
return false;
};
const mailRegex = /^[A-z0-9][\w.-]*@[A-z0-9][\w\-.]*\.[A-z0-9][A-z0-9-]+$/;
export const isMailValid = (mail: string) => {
return mailRegex.test(mail);
};
export const isPasswordValid = (password: string) => {
return password.length > 6 && password.length < 32;
};