Creates validation middleware for the given request target.
Uses the formatter resolved at plugin construction time.
The schema (Zod schema by default)
Which request part to validate
Optionaloptions: ValidationMiddlewareOptions
Per-validator options; forms: true also validates form bodies
The validation middleware
Validate data against the given schema.
The schema is expected to expose a safeParse method (Zod-compatible).
On success the parsed value is returned wrapped in ok(); on failure
the validator issues are mapped to ValidationIssue elements and
returned via err().
The validated output type
The schema object (must have safeParse)
The value to validate
Ok with the parsed value or Err with the issues
Default validation service.
The error formatter is resolved once at plugin construction time and passed in here, avoiding per-request formatter resolution.
Since
0.1.0