UNPKG

@bolttech/form-engine

Version:

A form engine based on form events for react projects

12 lines (11 loc) 601 B
import { TErrorMessages, TErrors, TFieldData, TVAvailableValidations } from '@core/types'; declare type TRuleValue = string | number | boolean | undefined; export interface ICustomValidationValue { from: number; to: number; validations: Record<string, any>; } declare const run: (value: TRuleValue, rules: TVAvailableValidations, errorMessages?: TErrorMessages, formData?: TFieldData) => TErrors; declare const generateCustomError: (name: string, message: string) => TErrors; declare const hasError: (errors?: TErrors) => boolean; export { generateCustomError, hasError, run };