Libraries
    Preparing search index...

    Type Alias SchemaFormInstance<TSchema>

    Return type for useSchemaForm — fully typed for IntelliSense. The useField method infers the field value type from the schema via PropertyDescriptor.

    type SchemaFormInstance<TSchema extends ObjectSchemaBuilder<any, any, any>> = {
        _getFormContext: () => FormContextValue;
        getValue: () => InferType<TSchema>;
        reset: (values?: Partial<InferType<TSchema>>) => void;
        setValue: (values: Partial<InferType<TSchema>>) => void;
        submit: () => Promise<ValidationResult<InferType<TSchema>>>;
        useField: <TPropertySchema extends SchemaBuilder<any, any, any>>(
            forProperty: (
                tree: PropertyDescriptorTree<TSchema, TSchema>,
            ) => PropertyDescriptor<TSchema, TPropertySchema, any>,
        ) => UseFieldResult<InferType<TPropertySchema>>;
        validate: () => Promise<ValidationResult<InferType<TSchema>>>;
    }

    Type Parameters

    • TSchema extends ObjectSchemaBuilder<any, any, any>
    Index

    Properties

    _getFormContext: () => FormContextValue

    — Used by FormProvider and Field to access internal context

    getValue: () => InferType<TSchema>
    reset: (values?: Partial<InferType<TSchema>>) => void
    setValue: (values: Partial<InferType<TSchema>>) => void
    submit: () => Promise<ValidationResult<InferType<TSchema>>>
    useField: <TPropertySchema extends SchemaBuilder<any, any, any>>(
        forProperty: (
            tree: PropertyDescriptorTree<TSchema, TSchema>,
        ) => PropertyDescriptor<TSchema, TPropertySchema, any>,
    ) => UseFieldResult<InferType<TPropertySchema>>
    validate: () => Promise<ValidationResult<InferType<TSchema>>>