removed unnecessary escaping

This commit is contained in:
Sebastian Sdorra
2018-07-27 10:17:48 +02:00
parent 92d0fc6e69
commit 466d8255eb

View File

@@ -1,6 +1,6 @@
// @flow
const nameRegex = /^([A-z0-9\.\-_@]|[^ ]([A-z0-9\.\-_@ ]*[A-z0-9\.\-_@]|[^\s])?)$/;
const nameRegex = /^([A-z0-9.\-_@]|[^ ]([A-z0-9.\-_@ ]*[A-z0-9.\-_@]|[^\s])?)$/;
export const isNameValid = (name: string) => {
return nameRegex.test(name);
@@ -13,7 +13,7 @@ export const isDisplayNameValid = (displayName: string) => {
return false;
};
const mailRegex = /^[A-z0-9][\w.-]*@[A-z0-9][\w\-\.]*\.[A-z0-9][A-z0-9-]+$/;
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);