Skip to content

Commit 54476bd

Browse files
fix: update password validation to use MIN_PASSWORD_LENGTH constant
1 parent e5a49c0 commit 54476bd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

apps/dokploy/pages/register.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { type ReactElement, useEffect, useState } from "react";
2323
import { useForm } from "react-hook-form";
2424
import { toast } from "sonner";
2525
import { z } from "zod";
26-
export const PASSWORD_RANGE = 8;
26+
export const MIN_PASSWORD_LENGTH = 8;
2727
const MINIMUM_REQUIRED_LENGTH = 1;
2828
const TIMEOUT_DURATION = 2000;
2929

@@ -45,7 +45,7 @@ const registerSchema = z
4545
.min(MINIMUM_REQUIRED_LENGTH, {
4646
message: "Password is required",
4747
})
48-
.refine((password) => password === "" || password.length >= PASSWORD_RANGE, {
48+
.refine((password) => password === "" || password.length >= MIN_PASSWORD_LENGTH, {
4949
message: "Password must be at least 8 characters",
5050
}),
5151
confirmPassword: z
@@ -55,7 +55,7 @@ const registerSchema = z
5555
})
5656
.refine(
5757
(confirmPassword) =>
58-
confirmPassword === "" || confirmPassword.length >= PASSWORD_RANGE,
58+
confirmPassword === "" || confirmPassword.length >= MIN_PASSWORD_LENGTH,
5959
{
6060
message: "Password must be at least 8 characters",
6161
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"private": true,
44
"workspaces": ["apps/*", "packages/*"],
55
"scripts": {
6-
" ": "pnpm --filter=dokploy run setup",
6+
"dokploy:setup": "pnpm --filter=dokploy run setup",
77
"dokploy:dev": "pnpm --filter=dokploy run dev",
88
"dokploy:dev:turbopack": "pnpm --filter=dokploy run dev-turbopack",
99
"dokploy:build": "pnpm --filter=dokploy run build",

0 commit comments

Comments
 (0)