This commit is contained in:
2026-03-22 13:55:23 +08:00
parent c3f196ded4
commit 69099986e0
616 changed files with 38942 additions and 3 deletions

View File

@@ -0,0 +1,29 @@
import { z } from 'zod'
export const profileValidator = z.object({
username: z
.string()
.min(2, {
error: 'Username must be at least 2 characters.',
})
.max(30, {
error: 'Username must not be longer than 30 characters.',
}),
email: z
.email({
error: 'Please select an email to display.',
}),
bio: z
.string()
.max(160, { error: 'Bio must not be longer than 160 characters.' })
.min(4, { error: 'Bio must be at least 2 characters.' }),
urls: z
.array(
z.object({
value: z.url({ error: 'Please enter a valid URL.' }),
}),
)
.optional(),
})
export type ProfileValidator = z.infer<typeof profileValidator>