Evalkeeper
    Preparing search index...

    Function inputFromFields

    • A suite's inputFromForm from its fields, any kinds: reads each field by kind (valuesFromFields) and checks the whole with the schema, throwing a plain error that names the first part that doesn't fit.

      Type Parameters

      • T

      Parameters

      • schema: ZodType<T>

        The suite's input schema.

      • fields: readonly FormField[]

        The suite's input fields (fields.input).

      Returns (form: FormData) => T

      A form reader to use as the suite's inputFromForm.