@resistdesign/voltra
    Preparing search index...

    Type Alias FormController

    Controller for a form instance and its fields.

    type FormController = {
        errors: Record<string, string>;
        fields: FormFieldController[];
        operation: TypeOperation;
        setErrors: (errors: Record<string, string>) => void;
        setFieldValue: (key: string, value: FormValue) => void;
        typeInfo: TypeInfo;
        typeTags?: TypeInfo["tags"];
        validate: () => boolean;
        values: FormValues;
    }
    Index

    Properties

    errors: Record<string, string>

    Validation errors keyed by field.

    Derived controllers for each field.

    operation: TypeOperation

    Active operation driving field state.

    setErrors: (errors: Record<string, string>) => void

    Override form errors with a provided map.

    setFieldValue: (key: string, value: FormValue) => void

    Update a field value by key.

    typeInfo: TypeInfo

    Type metadata used to build the form.

    typeTags?: TypeInfo["tags"]

    Optional type-level tags from the metadata.

    validate: () => boolean

    Validate the form and return success.

    values: FormValues

    Current form values keyed by field.