UNPKG

react-forminate

Version:

React.js + Typescript package that creates dynamic UI forms based on the JSON schema

6 lines (5 loc) 907 B
import { FieldIdType, FormDataCollectionType, FormFieldType, SetErrorsFn, SupportedTypes } from '../../types'; export declare const validateField: (fieldId: FieldIdType, value: SupportedTypes, formSchema: FormDataCollectionType, values: Record<string, any>, setErrors: SetErrorsFn, touchedFields?: Record<string, boolean>, forceValidate?: boolean) => Promise<void>; export declare const validateForm: (formSchema: FormDataCollectionType, values: Record<string, SupportedTypes>, setErrors: (errors: Record<string, string>) => void, touchedFields?: Record<string, boolean>, forceValidateAll?: boolean) => Promise<boolean>; export declare const shouldShowField: (field: FormFieldType, values: Record<string, any>, formSchema: FormDataCollectionType) => boolean; export declare const isDisableField: (field: FormFieldType, values: Record<string, SupportedTypes>, formSchema: FormDataCollectionType) => boolean;