fix(mail regex): removed global flag

This commit is contained in:
DecDuck
2024-12-27 13:14:29 +11:00
parent 61d88c3091
commit 43e32b44a2
3 changed files with 3 additions and 4 deletions

View File

@ -5,7 +5,7 @@ import { v4 as uuidv4 } from "uuid";
import * as jdenticon from "jdenticon";
// Only really a simple test, in case people mistype their emails
const mailRegex = /^\S+@\S+\.\S+$/g;
const mailRegex = /^\S+@\S+\.\S+$/;
export default defineEventHandler(async (h3) => {
const body = await readBody(h3);