Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit d1a6caa

Browse files
Apply suggestions from code review
Co-authored-by: Ryan Cartwright <[email protected]>
1 parent 96c984b commit d1a6caa

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

docs/guides/nodejs/zod.mdx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ updated_at: 2025-03-05
1212

1313
# A Unified Approach to validation across APIs, Queues & Jobs with Zod
1414

15-
On frontend applications validation can help users enter data in the correct format this stops them from providing empty values, invalid emails, or other common input mistakes.
15+
Validation can help users enter data in the correct format when interacting with front-end applications. This prevents them from providing empty values, invalid emails, or other common input mistakes.
1616

1717
Once data leaves the browser we still need to ensure that the data remains valid:
1818

@@ -23,7 +23,7 @@ Cloud applications don’t just receive requests from web forms. Data comes from
2323

2424
Server-side validation is critical—not just for security, but for maintaining data integrity across the system.
2525

26-
With Zod, we can define strict validation rules once and enforce them across APIs, events, and background jobs.
26+
With [Zod](https://zod.dev/), we can define strict validation rules once and enforce them across APIs, events, and background jobs.
2727

2828
## Defining a validation schema with Zod
2929

@@ -39,11 +39,6 @@ const userSchema = z.object({
3939
})
4040
```
4141

42-
### Breaking it down:
43-
44-
- `name` must be a string and at least 2 characters long. If it's too short, an error message is returned.
45-
- `email` must follow a valid email format, and Zod will automatically enforce this validation.
46-
- `age` must be a number and at least 18. If the value is below this threshold, an error message is returned.
4742

4843
This schema ensures that any user data passed into the application follows these strict rules.
4944

0 commit comments

Comments
 (0)