UNPKG

form-test-victor

Version:

# Performant forms and wizard library for React

33 lines 887 B
import { ReactNode } from 'react'; import { Validator } from '../types/Validation'; interface RuleProps { validationFn: Validator; message: string; children?: ReactNode; isDebounced?: boolean; } /** * * @param message - Message when error is true * @param children - Children * @param validationFn - Function run for the validation * @param isDebounced - Is validation function run with debounce * @example * ``` * <TextField name="foo"> * <Rule * message="REQUIRED" * validationFn={(value) => !!value && value !== ''} * /> * </TextField> * ``` */ export declare function Rule({ message, children, validationFn, isDebounced, }: RuleProps): ReactNode; export declare namespace Rule { var defaultProps: { children: null; isDebounced: boolean; }; } export {}; //# sourceMappingURL=Rule.d.ts.map