Skip to content

Commit 7bde6b7

Browse files
committed
fix: add validation constraints to ProfileEditBodySchema
1 parent e2e027d commit 7bde6b7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

shared/schemas/social.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ export type PackageLikeBody = v.InferOutput<typeof PackageLikeBodySchema>
1212

1313
// TODO: add 'avatar'
1414
export const ProfileEditBodySchema = v.object({
15-
displayName: v.string(),
16-
website: v.optional(v.string()),
17-
description: v.optional(v.string()),
15+
displayName: v.pipe(v.string(), v.maxLength(640)),
16+
website: v.optional(v.pipe(v.string(), v.url())),
17+
description: v.optional(v.pipe(v.string(), v.maxLength(2560))),
1818
})
1919

2020
export type ProfileEditBody = v.InferOutput<typeof ProfileEditBodySchema>

0 commit comments

Comments
 (0)