Modifying the message for the phone number format

This commit is contained in:
Maxime Lalo 2023-12-04 15:57:58 +01:00
parent 21837e8b91
commit fb0edf7da4
2 changed files with 3 additions and 2 deletions

View File

@ -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);

View File

@ -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;