UNPKG

@matthew.ngo/reform

Version:

A flexible and powerful React form management library with advanced validation, state observation, and multi-group support

11 lines (10 loc) 454 B
export declare type GroupId = string; export declare type GroupErrors = Record<number, Record<string, string>>; export declare type ValidationErrors = Record<GroupId, Record<string, string>>; export declare type FormValue<T> = FormGroup<T>[]; export interface FormGroup<T = any> { id: string; data: T; } export declare type FieldPath<T> = string; export declare type ValidFieldPath<T, P extends string> = P extends keyof T ? P : never;