Uploaded December 2024 | Updated September 2026, 2 weeks ago
The input of server functions comes through an HTTP request, you should always make sure the data they receive is exactly in the shape you expected. That's what the validator API is for!
TanStack Router Tutorial: youtube.com/playlist?list=PLOQjd5dsGSxJilh0lBofeY8Qib98kzmF5
TanStack Start Tutorial: youtube.com/playlist?list=PLOQjd5dsGSxIEKFg4dnSQ4zQkmTktfszp
Learn more on the official docs: tanstack.com/router/latest/docs/framework/react/start/overview
Tutorial Code: github.com/Balastrong/tanstack-start-demo/tree/02-server-function-validator
_______________________________
Support my work: github.com/sponsors/Balastrong ❤️
Hit like and subscribe for more content! :D
Beginner-Friendly Open Source Projects: github.com/DevLeonardoCommunity
Join the Discord community! Here's the invite: discord.gg/bqwyEa6We6
You can also follow me on the other platforms:
Twitter: twitter.com/Balastrong
dev.to: dev.to/balastrong
GitHub: github.com/Balastrong
Home: https://leonardomontini.dev/
TikTok: tiktok.com/@balastrong
Instagram: instagram.com/devbalastrong
_______________________________
TIMESTAMPS
00:00 Server Functions 101
00:51 Validation by type inference
01:19 Manual validation
01:44 Schema validation
02:23 Input Transformation
03:26 Send Objects
04:17 Submit formData
04:33 Return values and errors
#tanstack #react #nextjs
The input of server functions comes through an HTTP request, you should always make sure the data they receive is exactly in the shape you expected. That's what the validator API is for!
TanStack Router Tutorial: youtube.com/playlist?list=PLOQjd5dsGSxJilh0lBofeY8Qib98kzmF5
TanStack Start Tutorial: youtube.com/playlist?list=PLOQjd5dsGSxIEKFg4dnSQ4zQkmTktfszp
Learn more on the official docs: tanstack.com/router/latest/docs/framework/react/start/overview
Tutorial Code: github.com/Balastrong/tanstack-start-demo/tree/02-server-function-validator
_______________________________
Support my work: github.com/sponsors/Balastrong ❤️
Hit like and subscribe for more content! :D
Beginner-Friendly Open Source Projects: github.com/DevLeonardoCommunity
Join the Discord community! Here's the invite: discord.gg/bqwyEa6We6
You can also follow me on the other platforms:
Twitter: twitter.com/Balastrong
dev.to: dev.to/balastrong
GitHub: github.com/Balastrong
Home: https://leonardomontini.dev/
TikTok: tiktok.com/@balastrong
Instagram: instagram.com/devbalastrong
_______________________________
TIMESTAMPS
00:00 Server Functions 101
00:51 Validation by type inference
01:19 Manual validation
01:44 Schema validation
02:23 Input Transformation
03:26 Send Objects
04:17 Submit formData
04:33 Return values and errors
#tanstack #react #nextjs










