UNPKG

decoval

Version:

DecoVal is a decorator-driven validation pattern that allows you to add validation rules directly to the properties of TypeScript classes, simplifying data control and increasing code readability and reusability.

8 lines (7 loc) 302 B
export type ValArrayOptions = { minLength?: { value: number; message: string }; maxLength?: { value: number; message: string }; elementsType?: { value: "any" | "string" | "number" | "boolean"; message: string }; allowedValues?: { value: any[]; message?: string }; message?: string; };