envoc-form
Version:
Envoc form components
12 lines (11 loc) • 445 B
TypeScript
import React from 'react';
export interface ServerErrors {
[path: string]: string;
}
export interface ServerErrorContextProps {
errors: ServerErrors;
getError: (path: string) => string | undefined;
setError: (path: string, errorMessage: string | undefined) => void;
}
/** Context to store the API errors from the server for the form. */
export declare const ServerErrorContext: React.Context<ServerErrorContextProps>;