changement

This commit is contained in:
Emma781227
2026-09-14 22:30:40 +02:00
parent 8a6355cde1
commit 2201446ee6
54 changed files with 2495 additions and 139 deletions

View File

@@ -0,0 +1,11 @@
const { z } = require("zod");
// Les emails sont stockés et recherchés en minuscules, sans espaces autour :
// « Jean@Exemple.fr » et « jean@exemple.fr » désignent le même compte.
function normalizeEmail(email) {
return typeof email === "string" ? email.trim().toLowerCase() : email;
}
const emailSchema = z.string().trim().toLowerCase().email("Email invalide");
module.exports = { emailSchema, normalizeEmail };