From 9efe160340a90e5635ad018f22942c6ce3c08b62 Mon Sep 17 00:00:00 2001 From: ngn13 <78868991+ngn13@users.noreply.github.com> Date: Sat, 10 Jun 2023 22:13:44 +0300 Subject: [PATCH] making min password length configurable Co-authored-by: Puyodead1 --- src/api/routes/auth/register.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/routes/auth/register.ts b/src/api/routes/auth/register.ts index 7b62f621..f8bc6da2 100644 --- a/src/api/routes/auth/register.ts +++ b/src/api/routes/auth/register.ts @@ -225,7 +225,7 @@ router.post( } if (body.password) { - if(body.password.length<8){ + if(body.password.length < register.password.minLength){ throw FieldErrors({ password: { code: "PASSWORD_REQUIREMENTS_MIN_LENGTH",