Read the article

View Source

ZenStack Plugin

Schemas generated from schema.zmodel with @letar/zenstack-form-plugin. Both forms below are built entirely from generated code — not a single line of hand-written Zod.

Native attributes

sku and website validate via native ZModel attributes (@startsWith/@trim/@upper/@url).

Минимум 0
Целое число

Cross-field validation (@@validate)

The Event model declares @@validate(endsAt > startsAt, "End date must be after start date", ["endsAt"]) — try setting an end date before the start date, the error attaches to the endsAt field.