Skip to content

Commit 985f8c6

Browse files
kkanekanekv
andauthored
docs: fix Validation with Zod documentation (#5269)
Co-authored-by: kanekv <[email protected]>
1 parent b19e0b9 commit 985f8c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/start/framework/react/server-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const UserSchema = z.object({
9898
})
9999

100100
export const createUser = createServerFn({ method: 'POST' })
101-
.inputValidator((data) => UserSchema.parse(data))
101+
.inputValidator(UserSchema)
102102
.handler(async ({ data }) => {
103103
// data is fully typed and validated
104104
return `Created user: ${data.name}, age ${data.age}`

0 commit comments

Comments
 (0)