Skip to content

Commit

Permalink
feat(user): add min max in password
Browse files Browse the repository at this point in the history
  • Loading branch information
yohanngab committed Oct 26, 2023
1 parent f4c6ad6 commit 6d26f7c
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions server/src/validators/users.validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ const subscribeSchema = Joi.object({
comment: Joi.string().allow(null, ""),
etablissements: Joi.array().required(),
email: Joi.string().email({ tlds: false }).required(),
password: passwordComplexity(),
password: passwordComplexity({
min: 8,
max: 128,
}),
});

const updateSchema = Joi.object({
Expand All @@ -30,7 +33,10 @@ const forgotPasswordSchema = Joi.object({
});

const resetPasswordSchema = Joi.object({
password: passwordComplexity(),
password: passwordComplexity({
min: 8,
max: 128,
}),
token: Joi.string().required(),
});

Expand Down

0 comments on commit 6d26f7c

Please sign in to comment.