UNPKG

nralcm

Version:

This is a framework based on NodeJs to manage rest api request lifecycle

22 lines (21 loc) 590 B
import { ModelError } from "../common"; export interface ValidatorData { propertyKey: string; validator: string; displayName?: string; message?: string; validate: ValidateFunction | undefined; parameterIndex?: number; paramName?: string; paramValue?: any; } /** * Validate Function * @param value - value of class property * @param validatorData meta data of property * @param type instance of class * @returns true or error message */ export interface ValidateFunction { (value: any, validatorData: ValidatorData, type: any): true | ModelError; }