Validate data and return the parsed value, or throw a ValidationError on failure.
The schema.
The value to validate.
The parsed value.
Whether data satisfies schema.
The schema.
The value to validate.
True when valid.
Validate data against schema, returning a normalised result (never throws for validation
failures — inspect success).
The schema.
The value to validate.
The validation result.
Staticcreate
The validation service.
Platform-agnostic: it validates any value against any supported schema (Zod, Valibot, ArkType via Standard Schema, or a native Stone.js schema) and knows nothing about HTTP/CLI/browser. Register it in the container (see
ValidationServiceProvider) and resolve it asvalidator, or use the same schema directly on the frontend — one schema, both sides.