fix(gui): Email validation

fix #267

Signed-off-by: Pranav C Balan <pranavxc@gmail.com>
This commit is contained in:
Pranav C Balan
2021-06-13 20:25:31 +05:30
parent 8388e0a6b9
commit 797855d9df
4 changed files with 53 additions and 22 deletions

View File

@@ -453,6 +453,7 @@
import SetListCheckboxCell from "@/components/project/spreadsheet/editableCell/setListCheckboxCell";
import {enumColor as colors, enumColor} from "@/components/project/spreadsheet/helpers/colors";
import DlgLabelSubmitCancel from "@/components/utils/dlgLabelSubmitCancel";
import {isEmail} from "@/helpers";
export default {
name: "user-management",
@@ -475,7 +476,7 @@ export default {
valid: null,
emailRules: [
v => !!v || 'E-mail is required',
v => /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i.test(v) || 'E-mail must be valid'
v => isEmail(v) || 'E-mail must be valid'
],
userList: []
}),