UNPKG

fielder

Version:

A field-first form library for React and React Native

14 lines (13 loc) 559 B
import { FieldState, FormSchemaType } from '../types'; import { ActionHandler } from './util'; /** Sets the value of a field. */ export declare type SetFieldValidationAction = { type: 'SET_FIELD_VALIDATION'; config: SetFieldValidationArgs<any, any>; }; export declare type SetFieldValidationArgs<T extends FormSchemaType, K extends keyof T> = { name: K; validation?: FieldState<T, K>['_validate']; }; /** Triggers a change to the given field. */ export declare const doSetFieldValidation: ActionHandler<SetFieldValidationAction>;