import type { ValidatorDriver } from '../types.ts'; /** * Yup-vendor driver. Handles `body['~standard'].vendor === 'yup'`. * * Two yup-specific behaviors that the generic Standard Schema driver * doesn't cover: * * 1. **Strip unknown.** Yup's `~standard.validate(data)` does NOT strip * unknown fields. Today's framework calls `cast(data, {stripUnknown: true})` * explicitly. To preserve that behavior — and avoid a security * regression in handlers that spread `req.appInfo.request` into * `Model.create(...)` — this driver calls yup's native validate with * `{ stripUnknown: true, abortEarly: false }` directly. One call: * validates + casts + strips, throws on issues. * * 2. **Error translation.** Yup throws its own `ValidationError` with * `.inner[]` (one entry per failed field) and `.errors[]` (messages). * We translate to the framework's `ValidationError` via duck-typing * (no top-level yup import — keeps the framework runtime decoupled). */ export declare const yupDriver: ValidatorDriver;