import { VisualElement } from '@judo/model-api'; /** * Result from useValidation hook. */ export interface ValidationResult { /** Error message or null */ error: string | null; /** Whether field has been touched */ isTouched: boolean; /** Mark field as touched */ touch: () => void; /** Set error for this field */ setError: (error: string | null) => void; /** Clear error for this field */ clearError: () => void; } /** * Hook for single element validation. * * @param element - Visual element * @returns ValidationResult */ export declare function useValidation(element: VisualElement): ValidationResult; /** * Hook for form validation. * Requires ValidationProvider. * * @returns Full validation context * @throws Error if used outside ValidationProvider */ export declare function useFormValidation(): import('..').ValidationContextType; //# sourceMappingURL=use-validation.d.ts.map