Skip to content

docs: replace zod examples with valibot - #1634

Merged
brenelz merged 4 commits into
v2-rebuildfrom
docs-valibot-examples
Aug 18, 2026
Merged

docs: replace zod examples with valibot#1634
brenelz merged 4 commits into
v2-rebuildfrom
docs-valibot-examples

Conversation

@brenelz

@brenelz brenelz commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Pairs every zod validation example in the v2 docs with a valibot version in a Valibot/Zod tab group (valibot first, matching the fullstack templates' switch in solidjs/templates#276):

  • Server functions — all three examples (UserName, CreateUser with respond, and the router query/action integration)
  • Sessions and authentication — the renameCurrentUser validation example
  • Environment — the env.ts schema (zod's z.preprocess maps to a v.pipe with v.transform); the prose now says the fullstack template uses Valibot, but any Standard Schema library works
  • Migration from SolidStart — the env.ts example

Synced tab groups

All groups share a key (::::tab-group[validation-library]), so picking a library in one group updates every group and persists across pages. SolidBase's default theme already supports keyed groups, but osmium's DirectiveContainer overrides it — this PR ports the same logic (persisted signal with cookie storage + BroadcastChannel sync via @solid-primitives/storage) into the osmium theme. Keyless tab groups still render uncontrolled.

Verified in the dev server: all five groups render, switch together, and the selection carries across pages via the tab-group:validation-library cookie.

🤖 Generated with Claude Code

Convert the validation examples in server functions, sessions and
auth, environment, and the SolidStart migration guide from zod to
valibot, matching the fullstack template's switch to valibot.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify

netlify Bot commented Aug 17, 2026

Copy link
Copy Markdown

Deploy Preview for solid-docs-v2 ready!

Name Link
🔨 Latest commit 8c9e546
🔍 Latest deploy log https://app.netlify.com/projects/solid-docs-v2/deploys/6a83a5edf8ba9d0009e7d12b
😎 Deploy Preview https://deploy-preview-1634--solid-docs-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Restore the zod versions of every validation example and pair them
with the valibot versions in tab-group directives, valibot first.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
brenelz and others added 2 commits August 17, 2026 19:22
Key every Valibot/Zod tab group as tab-group[validation-library] and
teach osmium's DirectiveContainer to honor the key the way SolidBase's
default theme does: a persisted signal (cookie storage, BroadcastChannel
sync) drives keyed groups, so selecting a library in one group updates
every group and persists across pages. Keyless groups stay uncontrolled.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@brenelz
brenelz merged commit 881d96d into v2-rebuild Aug 18, 2026
8 checks passed
@brenelz
brenelz deleted the docs-valibot-examples branch August 18, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants