Hex Core JS
    Preparing search index...

    Type Alias FormSubmissionErrors<FV>

    FormSubmissionErrors: { _: string[] } & {
        [K in keyof FV]: {
            _: string[];
            subErrors?: FV[K] extends FormValues[]
                ? FormSubmissionErrors<FV[K][number]>[]
                : undefined;
        }
    }

    Errors received from a submission attempt.

    Type Parameters

    type ContactMethodForm = {
    email: string;
    phone: string;
    };

    type PersonForm = {
    name: string;
    age: number;
    contactMethods: ContactMethodForm[];
    };

    const errs: FormSubmissionErrors<PersonForm> = {
    _: [""],
    name: {
    _: [""],
    },
    age: {
    _: [""],
    },
    contactMethods: {
    _: [""],
    subErrors: [
    {
    _: [""],
    email: {
    _: [""],
    },
    phone: {
    _: [""],
    },
    },
    ],
    },
    };