fix(mail regex): removed global flag

This commit is contained in:
DecDuck
2024-12-27 13:14:29 +11:00
parent a5bf7b66b2
commit 4870f1dbf6
3 changed files with 3 additions and 4 deletions
@@ -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);