From fb0edf7da461aacab22b6bbf3a8928335f94e51a Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Mon, 4 Dec 2023 15:57:58 +0100 Subject: [PATCH] :sparkles: Modifying the message for the phone number format --- dist/Notary/Contact.js | 2 +- src/Notary/Contact.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dist/Notary/Contact.js b/dist/Notary/Contact.js index 165701f..925838e 100644 --- a/dist/Notary/Contact.js +++ b/dist/Notary/Contact.js @@ -97,7 +97,7 @@ __decorate([ }), (0, class_validator_1.Matches)(/^\+[2-9]{2,3}[0-9]{9}$/, { groups: ["createCustomer", "updateCustomer"], - message: "Le numéro de téléphone doit être au format 06XXXXXXXX", + message: "Le numéro de téléphone doit être au format 0X XX XX XX XX ou +33X XX XX XX XX", }), __metadata("design:type", String) ], Contact.prototype, "cell_phone_number", void 0); diff --git a/src/Notary/Contact.ts b/src/Notary/Contact.ts index 1201ab1..f5015ac 100644 --- a/src/Notary/Contact.ts +++ b/src/Notary/Contact.ts @@ -70,7 +70,8 @@ export default class Contact extends ContactCustomer { }) @Matches(/^\+[2-9]{2,3}[0-9]{9}$/, { groups: ["createCustomer", "updateCustomer"], - message: "Le numéro de téléphone doit être au format 06XXXXXXXX", + message: + "Le numéro de téléphone doit être au format 0X XX XX XX XX ou +33X XX XX XX XX", }) public override cell_phone_number!: string;