import { ValidationRuleWithoutParams, ValidationRuleWithParams, ValidationRule, ValidationArgs } from '@vuelidate/core'; import { Ref } from 'vue-demi'; // Rules export const alpha: ValidationRuleWithoutParams; export const alphaNum: ValidationRuleWithoutParams; export const and: ( ...validators: ValidationRule[] ) => ValidationRuleWithoutParams; export const between: ( min: number | Ref, max: number | Ref ) => ValidationRuleWithParams<{ min: number, max: number }>; export const decimal: ValidationRuleWithoutParams; export const email: ValidationRuleWithoutParams; export const integer: ValidationRuleWithoutParams; export const ipAddress: ValidationRuleWithoutParams; export const macAddress: (separator: string | Ref) => ValidationRuleWithoutParams; export const maxLength: ( max: number | Ref ) => ValidationRuleWithParams<{ max: number }>; export const maxValue: ( max: number | Ref | string | Ref ) => ValidationRuleWithParams<{ max: number }>; export const minLength: ( min: number | Ref ) => ValidationRuleWithParams<{ min: number }>; export const minValue: ( min: number | Ref | string | Ref ) => ValidationRuleWithParams<{ min: number }>; export const not: (validator: ValidationRule) => ValidationRuleWithoutParams; export const numeric: ValidationRuleWithoutParams; export const or: ( ...validators: ValidationRule[] ) => ValidationRuleWithoutParams; export const required: ValidationRuleWithoutParams; export const requiredIf: (prop: boolean | Ref | string | (() => boolean | Promise)) => ValidationRuleWithoutParams; export const requiredUnless: (prop: boolean | Ref | string | (() => boolean | Promise)) => ValidationRuleWithoutParams; export const sameAs: ( equalTo: E | Ref, otherName?: string ) => ValidationRuleWithParams<{ equalTo: E, otherName: string }>; export const url: ValidationRuleWithoutParams; export const helpers: { withParams: (params: object, validator: ValidationRule) => ValidationRuleWithParams withMessage: (message: string | ((params: MessageProps) => string), validator: ValidationRule) => ValidationRuleWithParams req: Function len: Function regex: Function unwrap: Function withAsync: Function, forEach: (validators: ValidationArgs) => { $validator: ValidationRule, $message: () => string } } export function TranslationFunction(path: string, params: { model: string, property: string, [key: string]: any }): string export function messagePathFactory(params: MessageProps): string; export function messageParamsFactory(params: { model: unknown, property: string, invalid: boolean, pending: boolean, propertyPath: string, response: unknown, validator: string, [key: string]: any }): string; export interface MessageProps { $model: string; $property: string; $params: { [attr: string] : any }; $validator: string; $pending: boolean; $invalid: boolean; $response: unknown; $propertyPath: string; } export type ValidatorWrapper = (...args: any[]) => ValidationRule ; declare function withI18nMessage ( validator: T, options?: { withArguments?: boolean, messagePath?: typeof messagePathFactory, messageParams?: typeof messageParamsFactory, }): T export function createI18nMessage({ t, messagePath, messageParams }: { t: typeof TranslationFunction; messagePath?: typeof messagePathFactory; messageParams?: typeof messageParamsFactory; }): typeof withI18nMessage