examples/

directory
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2025 License: MIT

README

GoZod Examples

A curated set of examples to help you explore GoZod quickly without feeling overwhelmed. Navigate to any directory and run go run . to see it in action.

Folder Purpose
quickstart One-minute tour of basic validation—start here
primitive Core string / number validations & chaining
object Nested objects, optional fields, regex validation
coerce Primitive type coercion (string ⇄ number ⇄ bool ⇄ time)
intersection Combining schemas with logical AND constraints
union Flexible OR type example (string or int)
format Built-in format validators: Email, URL, ISO-8601, JWT
advanced_lazy Lazy / deferred schema construction demo
error_handling Structured error inspection & pretty printing
i18n Multilingual errors – switch to Simplified Chinese locale
config Real-world JSON config validation using MustParse

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL