UNPKG

@stacksjs/validation

Version:
15 lines (14 loc) 539 B
import type { VineType } from '@stacksjs/types'; declare interface RequestData { [key: string]: any } declare interface ValidationField { rule: VineType message: Record<string, string> } declare interface CustomAttributes { [key: string]: ValidationField } export declare function isObjectNotEmpty(obj: object | undefined): boolean; export declare function validateField(modelFile: string, params: RequestData): Promise<any>; export declare function customValidate(attributes: CustomAttributes, params: RequestData): Promise<any>;