Skip to content

Commit

Permalink
fix: require extension in courriel regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-gavanier committed Dec 20, 2023
1 parent dafed32 commit 9cfaa1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/contact/contact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type Contact = Model<
export type ContactToValidate = Omit<Contact, 'isContact'>;

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;
Expand Down

0 comments on commit 9cfaa1d

Please sign in to comment.