You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs(prisma): show zod field errors in the create example - #9374
Small follow-up to #9357, which merged this morning. In the "Adding a user" example, a zod$ validation failure sets createUserAction.value.failed but not message, so the page's form rendered an empty <p> for an invalid email. The example now renders value.message ?? value.fieldErrors?.email, so the form shows "Email already in use" on a duplicate and "Invalid email" on bad input. One sentence above the code block explains where zod$ puts its errors.
This came out of a CodeRabbit comment on #9358, whose starter route has the same fix (5f95360). Verified on a fresh npm create qwik@rc -- empty app with the route copied from this page: tsc passes, an invalid email returns 400 with "Invalid email" in the HTML, a duplicate returns 409 with "Email already in use".
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
No actionable comments were generated in the recent review.
Walkthrough
The Prisma guide now documents how zod$ validation failures populate failed and fieldErrors. The create-user form displays the email field error when no action message is present.
The guide explains that zod$ validation failures set failed and provide messages in fieldErrors. The form displays fieldErrors.email when message is absent.
QwikDev/qwik#9357: This PR edits the Prisma create example introduced by that PR and documents validation feedback from its zod$ usage.
Suggested reviewers:wmertens
Merge Risk: Minimal · up to 76a02
This documentation-only change correctly explains and renders Zod email validation feedback.
Architecture risk: Low · up to 76a02
The change affects 1 system.
Changed systems:packages/docs
Architecture concerns
No architecture-level concerns identified.
Review details
Systems and components
observed — packages/docs (api) was modified; 1 changed file maps to changed impact.
Before / after behavior
observed — Modified behavior in packages/docs/src/routes/docs/integrations/prisma/index.mdx: The duplicate-email explanation now also documents that zod$ validation failures set failed and provide messages in fieldErrors; the form displays either validation feedback or the existing duplicate-email message.
observed — Modified behavior in packages/docs/src/routes/docs/integrations/prisma/index.mdx: The failure message rendering now falls back to fieldErrors.email when message is absent.
Pre-merge checks: 5
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely describes the documentation change to show Zod field errors in the Prisma create example.
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: defaults
Review profile: CHILL
Plan: Advanced
Run ID: df68a044-1abb-4b74-951e-89ad0c5e269a
Commits
Reviewing files that changed from the base of the PR and between fc71359 and 76a025e.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is it?
Description
Small follow-up to #9357, which merged this morning. In the "Adding a user" example, a
zod$validation failure setscreateUserAction.value.failedbut notmessage, so the page's form rendered an empty<p>for an invalid email. The example now rendersvalue.message ?? value.fieldErrors?.email, so the form shows "Email already in use" on a duplicate and "Invalid email" on bad input. One sentence above the code block explains wherezod$puts its errors.This came out of a CodeRabbit comment on #9358, whose starter route has the same fix (5f95360). Verified on a fresh
npm create qwik@rc -- emptyapp with the route copied from this page:tscpasses, an invalid email returns 400 with "Invalid email" in the HTML, a duplicate returns 409 with "Email already in use".Checklist
Summary by CodeRabbit