From 9cfaa1dccde57b54143b7420c63837bf13c3c505 Mon Sep 17 00:00:00 2001 From: Marc Gavanier Date: Wed, 20 Dec 2023 10:25:13 +0100 Subject: [PATCH] fix: require extension in courriel regexp --- src/models/contact/contact.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/contact/contact.ts b/src/models/contact/contact.ts index 824ebc6..57a7e7f 100644 --- a/src/models/contact/contact.ts +++ b/src/models/contact/contact.ts @@ -15,7 +15,7 @@ export type Contact = Model< export type ContactToValidate = Omit; const COURRIEL_REG_EXP: RegExp = - /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/u; + /^[a-zA-Z0-9_][a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])+$/u; const TELEPHONE_REG_EXP: RegExp = /^(?:(?:\+|00)(?:33|594|262|596|269|687|689|590|508|681)[\s.-]{0,3}(?:\(0\)[\s.-]{0,3})?|0)(?:(?:[1-9](?:[\s.-]?\d{2}){4}|\d{2}(?:[\s.-]\d{3}){2})|\s\d{3}(?:\s\d{2}){3})$/u;