vuestic-ui
Version:
Vue 3 UI Framework
28 lines (27 loc) • 900 B
TypeScript
import { DefineEmits, DefineProps } from './../utils/types/composable-props';
export type ValidationRule<V = any> = ((v: V) => any | string) | Promise<((v: V) => any | string)>;
export type ValidationProps<ModelValue = any> = DefineProps<{
name?: string;
rules?: ValidationRule<ModelValue>[];
dirty?: boolean;
error?: boolean;
errorMessages?: string | string[];
errorCount?: number | string;
success?: boolean;
messages?: string | string[];
immediateValidation?: boolean;
modelValue?: ModelValue;
}>;
export type ValidationEmits = DefineEmits<{
'update:error': [boolean];
'update:errorMessages': [string | string[]];
'update:dirty': [boolean];
}>;
export declare const validationPropsDefaults: {
rules: () => never[];
dirty: false;
errorCount: number;
success: false;
messages: () => never[];
immediateValidation: false;
};