Skip to content

Commit 0bdcbf5

Browse files
authored
Merge pull request #4323 from Dokploy/fix/forgot-password-email-max-length
fix: enforce 255-char max length on forgot password email field
2 parents fb6b06f + 34564ae commit 0bdcbf5

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

apps/dokploy/pages/send-reset-password.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ const loginSchema = z.object({
3030
.min(1, {
3131
message: "Email is required",
3232
})
33+
.max(255, {
34+
message: "Email must be at most 255 characters",
35+
})
3336
.email({
3437
message: "Email must be a valid email",
3538
}),
@@ -118,7 +121,11 @@ export default function Home() {
118121
<FormItem>
119122
<FormLabel>Email</FormLabel>
120123
<FormControl>
121-
<Input placeholder="Email" {...field} />
124+
<Input
125+
placeholder="Email"
126+
maxLength={255}
127+
{...field}
128+
/>
122129
</FormControl>
123130
<FormMessage />
124131
</FormItem>

0 commit comments

Comments
 (0)