UNPKG

@kevinkosterr/vue3-form-generator

Version:

A schema-based form generator component for Vue 3, based on the original [`vue-form-generator`](https://github.com/vue-generators/vue-form-generator) library.

11 lines (10 loc) 842 B
import { ValidationTrigger } from '../resources/types/generic'; /** * Use a provided validator function when the trigger of that validator matches * the validation method used for the current form or form field. * @param {Function} fn - validator function to execute upon meeting conditions * @param {ValidationTrigger} trigger - trigger for the validation, 'onBlur' or 'onChanged' * @param {string | undefined} fieldValidationMethod - validation method as set by the field schema, can be undefined. * @param {string | undefined} formValidationMethod - validation method as set by the form options, can be undefined. */ export declare function useValidationWrapper(fn: (...args: any[]) => void, trigger: ValidationTrigger, fieldValidationMethod: string | undefined, formValidationMethod: string | undefined): (...args: any[]) => void;