export interface ValidateAllResult { /** `true` when every discovered FormAtom is valid. */ isValid: boolean; /** Flat list of every error string collected across all FormAtoms. */ errors: string[]; /** Map from a human-readable key path to that field's errors. */ errorsByField: Record; } /** * Deeply walks an object or array, finds every `FormAtom` value, calls * `.validate()` on each one, and returns the aggregated result. * * Works with: * - Plain objects (recursed by key) * - Arrays (recursed by index) * - Nested combinations of the two * - FormAtom values at any depth * * Non-object / non-array leaves that aren't FormAtoms are silently skipped. * * @example * ```ts * const form = { * name: formAtom("", () => [isRequired]), * email: formAtom("", () => [isRequired, isEmail]), * address: { * street: formAtom("", () => [isRequired]), * city: formAtom("", () => [isRequired]), * }, * tags: [formAtom("", () => [isRequired]), formAtom("", () => [isRequired])], * }; * * const { isValid, errors, errorsByField } = validateAll(form); * // isValid → false * // errors → ["Required", "Required", ...] * // errorsByField → { "name": ["Required"], "email": ["Required"], ... } * ``` */ export declare function validateAll(input: unknown): ValidateAllResult; //# sourceMappingURL=validateAll.d.ts.map