UNPKG

@matthew.ngo/reform

Version:

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

15 lines (12 loc) 496 B
export type GroupId = string; export type GroupErrors = Record<number, Record<string, string>>; export type ValidationErrors = Record<GroupId, Record<string, string>>; export type FormValue<T> = FormGroup<T>[]; export interface FormGroup<T = any> { id: string; data: T; } // Simplified field path - just using dot notation string export type FieldPath<T> = string; // Helper type for type checking (optional) export type ValidFieldPath<T, P extends string> = P extends keyof T ? P : never;