Skip to content
playground

The real package, running in your tab.

Nothing here is a mock. The page imports @oxog/vld@3.0.11 from npm into your browser, builds real schemas, and renders the exact issues, formatted errors and throughput it produces. Edit the payload and watch it react.

User profile

A strict object with strings, numbers, an enum and an array.

valid JSON

schema.tsv1
1const userSchema = v.object({2  name: v.string().min(2).max(100),3  email: v.string().email(),4  age: v.number().int().positive().optional(),5  role: v.enum("admin", "user", "guest").default("user"),6  tags: v.array(v.string()).min(1),7}).strict();

inferred type

type Input = v.infer<typeof schema>;

{
  name: string;
  email: string;
  age?: number;
  role: "admin" | "user" | "guest";
  tags: string[];
}
warming engine

result.data — typed, coerced and defaulted

32 locales · applied by setLocale()

active: English

Messages are bound when a schema is constructed, so switching locale rebuilds the schema above — exactly what your app does when it loads a user's language.

V2 method memoization

Flips every v.* factory through v.setV2Mode(). Same schemas, same errors — 1.6–10× less memory per instance.

throughput · this machine

Run 100,000 safeParse calls of the current payload and read the best of five runs.

optional · bundles zod on demand

Run the head-to-head yourself.

This builds the same nine-field schema twice — once with @oxog/vld, once with the published zod you have on disk — then checks that both agree on a valid and an invalid payload before timing them.

  • id: uuid
  • name: string().min(2).max(100)
  • email: email
  • age: int().min(18).max(120)
  • score: number().min(0).max(1000)
  • role: enum(admin,user,guest)
  • tags: array(string).min(1)
  • active: boolean
  • url: url

100,000 safeParse calls per library, best of five runs. A single schema on a single machine is not a benchmark suite — treat the ratio as an indication, and reproduce the full suite locally.

Press run. Zod is fetched only at this moment, so it costs the page nothing until you ask for it.