remix/data-schema/form-data · Function

View Source

object

Summary

Creates a Standard Schema-compatible schema that reads typed values from a FormData or URLSearchParams object.

Use the returned schema with parse() or parseSafe() from @remix-run/data-schema.

Signature

function object<schema extends FormDataSchema>(schema: schema): FormDataObjectSchema<schema>

Returns

A schema that validates a FormData or URLSearchParams object and produces typed output.