mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-13 00:02:37 +10:00
fix(mail regex): removed global flag
This commit is contained in:
@ -382,7 +382,6 @@ import {
|
||||
import type { Invitation } from "@prisma/client";
|
||||
import moment from "moment";
|
||||
import type { SerializeObject } from "nitropack";
|
||||
import LoadingButton from "~/components/LoadingButton.vue";
|
||||
|
||||
definePageMeta({
|
||||
layout: "admin",
|
||||
@ -434,7 +433,7 @@ const email = computed({
|
||||
_email.value = v;
|
||||
},
|
||||
});
|
||||
const mailRegex = /^\S+@\S+\.\S+$/g;
|
||||
const mailRegex = /^\S+@\S+\.\S+$/;
|
||||
const validEmail = computed(() =>
|
||||
_email.value === undefined ? true : mailRegex.test(email.value as string)
|
||||
);
|
||||
|
||||
@ -208,7 +208,7 @@ const username = ref(invitation.data.value?.username);
|
||||
const password = ref("");
|
||||
const confirmPassword = ref(undefined);
|
||||
|
||||
const mailRegex = /^\S+@\S+\.\S+$/g;
|
||||
const mailRegex = /^\S+@\S+\.\S+$/;
|
||||
const validEmail = computed(() => mailRegex.test(email.value ?? ""));
|
||||
const validUsername = computed(
|
||||
() =>
|
||||
|
||||
Reference in New Issue
Block a user