Setu-TS
    Preparing search index...

    Interface ValidationMiddlewareOptions

    Per-validator options for IValidationService.middleware.

    // Accept a server-rendered <form> post as well as JSON on this route only.
    const middleware = validation.middleware(ContactSchema, 'body', { forms: true });

    0.10.0

    interface ValidationMiddlewareOptions {
        forms?: boolean;
    }
    Index
    forms?: boolean

    Validate application/x-www-form-urlencoded and multipart/form-data bodies with the same schema. The first-party service otherwise requires application/json or application/*+json; an unsupported or absent type answers 415 before any body read. Replacement services own their media-type handling. Cookie-authenticated routes still need csrfMiddleware or csrfFormMiddleware; pair opted-in forms with the latter. Read only for the body target.