@inkline/inkline
Version:
Inkline is the intuitive UI Components library that gives you a developer-friendly foundation for building high-quality, accessible, and customizable Vue.js 3 Design Systems.
20 lines (19 loc) • 633 B
TypeScript
import type { Ref } from 'vue';
export declare function useValidation(options: {
name?: Ref<string>;
validate?: Ref<boolean>;
schema?: Ref;
onUpdate?: (model: any) => void;
onSubmit?: (model: any) => void;
}): {
schema: any;
onSubmit: (event: SubmitEvent) => Promise<void>;
onInput: (nameRef: Ref<string | undefined>, value: any) => Promise<void>;
onBlur: (nameRef: Ref<string | undefined>, event: any) => void;
};
export declare function useFormValidationError(options: {
schema: Ref;
error: Ref<boolean | string[] | undefined>;
}): {
hasError: import("vue").ComputedRef<boolean>;
};